[prev in list] [next in list] [prev in thread] [next in thread]
List: gnash-dev
Subject: Re: [Gnash-dev] ColorTransform and EditText (YouTube buzz videos)
From: Michael Fötsch <foetsch () yahoo ! com>
Date: 2009-02-16 20:38:40
Message-ID: 4999CED0.6060305 () yahoo ! com
[Download RAW message or body]
Benjamin Wolsey wrote:
> Great! What would be very useful as a starting point is a manual ming
> testcase so that the behaviour can be verified visually: several
> static / dynamic TextFields variously with embedded and device fonts,
> and with various rgba values for the text and the parent MovieClip.
The file /testsuite/samples/input-fields.swf seems to do just that. I'm
attaching a slightly modified version along with a screenshot from Flash
10 on GNU/Linux.
> The fix is possibly in TextRecord::displayRecords() - when it's a device
> font, using cxform() instead of get_world_cxform() and always setting
> alpha to opaque. TextField::get_world_cxform() also affects border and
> background colour of TextFields, so it would also be worth testing
> whether these are affected by the parent's transform or not.
With device fonts, border and background are not affected by the
transform either, so I patched TextField.cpp (see attached).
Kind Regards,
M.F.
P.S.: I found the #define PP_COMPATIBLE_DEVICE_FONT_HANDLING in
TextField.cpp and this wiki page that are related to the issue:
http://wiki.gnashdev.org/DeviceFonts#Differences_with_proprietary_player_implementation
["TextField-patch.txt" (text/plain)]
=== modified file 'libcore/TextField.cpp'
--- libcore/TextField.cpp 2009-02-10 15:38:43 +0000
+++ libcore/TextField.cpp 2009-02-16 18:48:07 +0000
@@ -1691,22 +1691,14 @@
cxform
TextField::get_world_cxform() const
{
- cxform cf = character::get_world_cxform();
-
-#ifdef PP_COMPATIBLE_DEVICE_FONT_HANDLING
- if ( ! getEmbedFonts() ) /* if using a device font (PP compatibility) */
- {
- // set alpha to default values to make the text field opaque
- cf.m_[3][0] = 1.0f;
- cf.m_[3][1] = 0.0f;
-
- // NOTE: Linux version of Adobe's player also ignores tint
- // transform, so we should (or not) return an identity cxform
- // here. This has to be discussed...
- }
-#endif
-
- return cf;
+ if ( ! getEmbedFonts() ) /* if using a device font (PP compatibility) */
+ {
+ return cxform();
+ }
+ else
+ {
+ return character::get_world_cxform();
+ }
}
void
["input-fields.tar.gz" (application/x-gzip)]
_______________________________________________
Gnash-dev mailing list
Gnash-dev@gnu.org
http://lists.gnu.org/mailman/listinfo/gnash-dev
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic