mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 13:06:59 -04:00
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:
@@ -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)(
|
||||
|
||||
Reference in New Issue
Block a user