Implemented ContourMask (mask for text fields)

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@251 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2007-04-12 18:11:41 +00:00
parent 42ab8c84c0
commit 958da421d9
5 changed files with 71 additions and 10 deletions
+9
View File
@@ -8,10 +8,19 @@
#include <render/value/text.hpp>
#include <render/card/viewer.hpp>
#include <data/stylesheet.hpp>
// ----------------------------------------------------------------------------- : TextValueViewer
void TextValueViewer::draw(RotatedDC& dc) {
if (!style().mask_filename.empty() && !style().mask.ok()) {
// load contour mask
Image image;
InputStreamP image_file = viewer.stylesheet->openIn(style().mask_filename);
if (image.LoadFile(*image_file)) {
style().mask.load(image);
}
}
drawFieldBorder(dc);
v.prepare(dc, value().value(), style(), viewer.getContext());
v.draw(dc, style(), (DrawWhat)(