Added <color:???> and <size:???> tags for changing text color/size

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@831 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2008-03-24 14:52:42 +00:00
parent 451158820a
commit 4defac43ff
7 changed files with 53 additions and 11 deletions
+4 -1
View File
@@ -48,7 +48,7 @@ void Font::initDependencies(Context& ctx, const Dependency& dep) const {
shadow_color.initDependencies(ctx, dep);
}
FontP Font::make(int add_flags, Color* other_color) const {
FontP Font::make(int add_flags, Color* other_color, double* other_size) const {
FontP f(new Font(*this));
f->flags |= add_flags;
if (add_flags & FONT_CODE_STRING) {
@@ -68,6 +68,9 @@ FontP Font::make(int add_flags, Color* other_color) const {
if (other_color) {
f->color = *other_color;
}
if (other_size) {
f->size = *other_size;
}
return f;
}
+2 -2
View File
@@ -58,8 +58,8 @@ class Font : public IntrusivePtrBase<Font> {
return shadow_displacement.width != 0 || shadow_displacement.height != 0;
}
/// Add style to a font, and optionally change the color
FontP make(int add_flags, Color* other_color) const;
/// Add style to a font, and optionally change the color and size
FontP make(int add_flags, Color* other_color, double* other_size) const;
/// Convert this font to a wxFont
wxFont toWxFont(double scale) const;