From fdb3bda26ec3750d3d4bf0e87ab525e67292e0ee Mon Sep 17 00:00:00 2001 From: twanvl Date: Fri, 16 May 2008 20:07:11 +0000 Subject: [PATCH] Text drawing now uses an AColor instead of a normal Color, so transparent text is possible. git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@848 0fc631ac-6414-0410-93d0-97cfa31319b6 --- doc/type/font.txt | 2 +- src/data/font.cpp | 1 + src/data/font.hpp | 5 +++-- src/gfx/gfx.hpp | 2 +- src/gfx/resample_text.cpp | 10 ++++++++-- src/util/rotation.cpp | 17 ++++++++++------- src/util/rotation.hpp | 3 ++- 7 files changed, 26 insertions(+), 14 deletions(-) diff --git a/doc/type/font.txt b/doc/type/font.txt index a79e9b63..83fcddde 100644 --- a/doc/type/font.txt +++ b/doc/type/font.txt @@ -15,7 +15,7 @@ A reference to a normal [[type:font]] for drawing text. | @style@ [[type:scriptable]] font style @"normal"@ Style of the font, one of @"normal"@ or @"italic"@. This can be changed locally by [[type:tagged string|tags]]. | @underline@ [[type:scriptable]] [[type:boolean]] @false@ Should the font be underlined? | @color@ [[type:scriptable]] [[type:color]] @rgb(0,0,0)@ What color should text be drawn in? -| @shadow color@ [[type:scriptable]] [[type:color]] @rgb(0,0,0)@ Color for a shadow below the text. +| @shadow color@ [[type:scriptable]] [[type:color]] @"transparent"@ Color for a shadow below the text. | @shadow displacement x@ [[type:double]] @0@ Relative position of the shadow in pixels. A shadow is only drawn if the displacement is nonzero. | @shadow displacement y@ [[type:double]] @0@ ^^^ | @shadow blur@ [[type:double]] @0@ How much should the shadow be blurred? diff --git a/src/data/font.cpp b/src/data/font.cpp index 8b882ff5..e575540c 100644 --- a/src/data/font.cpp +++ b/src/data/font.cpp @@ -17,6 +17,7 @@ Font::Font() , underline(false) , scale_down_to(100000) , max_stretch(1.0) + , color(AColor(0,0,0)) , shadow_displacement(0,0) , shadow_blur(0) , separator_color(128,128,128) diff --git a/src/data/font.hpp b/src/data/font.hpp index 483844ab..bf8c6b07 100644 --- a/src/data/font.hpp +++ b/src/data/font.hpp @@ -12,6 +12,7 @@ #include #include #include