[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnash-dev] ColorTransform and EditText (YouTube buzz videos)
From: |
Michael Fötsch |
Subject: |
Re: [Gnash-dev] ColorTransform and EditText (YouTube buzz videos) |
Date: |
Mon, 16 Feb 2009 21:38:40 +0100 |
User-agent: |
Thunderbird 2.0.0.19 (X11/20090105) |
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
=== 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
Description: GNU Zip compressed data