[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-dev] ColorTransform and EditText (YouTube buzz videos)

From: Michael Fötsch
Subject: [Gnash-dev] ColorTransform and EditText (YouTube buzz videos)
Date: Sat, 07 Feb 2009 17:42:46 +0100
User-agent: Thunderbird (X11/20090105)


On the YouTube front page, there's an SWF with "Videos being watched right now". When you hover over a thumbnail, the video title appears beneath the thumbnail. In the proprietary player, the title appears in blue; in Gnash, it's white on white, so this is a bug.

The TextField has RGB=0,50,151. It's the child of a sprite with a ColorTransform that forces all colors to white. In Flash 10, the parent's ColorTransform doesn't seem to affect the TextField. In Gnash, TextField::get_world_cxform accumulates the ColorTransforms of the parents. See also the test case that I'm attaching. (Use it with `swfmill xml2swf cxtest.xml cxtest.swf`)

In TextField::get_world_cxform, I found this comment:

"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..."

Has this been discussed already?

If I can help with testing or coding for this bug, please let me know how.

Kind Regards,
<?xml version="1.0"?>
<swf version="7" compressed="1">
  <Header framerate="12" frames="1">
      <Rectangle left="0" right="6400" top="0" bottom="4800"/>
          <Color red="255" green="255" blue="255"/>

      <!-- This EditText is blue with alpha=128 --> 
      <DefineEditText objectID="1" wordWrap="1" multiLine="1" password="0" 
readOnly="0" autoSize="0" hasLayout="1" notSelectable="0" hasBorder="0" 
isHTML="0" useOutlines="0" fontRef="9" fontHeight="252" align="2" 
leftMargin="0" rightMargin="0" indent="0" leading="0" variableName="" 
initialText="hello world!">
          <Rectangle left="0" right="6400" top="0" bottom="3200"/>
          <Color red="0" green="0" blue="255" alpha="128"/>

      <DefineSprite objectID="2" frames="1">
          <PlaceObject2 replace="0" depth="1" objectID="1">
              <Transform transX="0" transY="0"/>

          This is the parent of the EditText. It has a ColorTransform that 
converts all colors to red
          and leaves alpha unaffected.
          In Gnash, the child EditText appears red, still with alpha=128.
          In Flash 10, the ColorTransform does not affect the EditText (still 
blue). The original alpha
          of the EditText is ignored (alpha=255).
      <PlaceObject2 replace="0" depth="1" objectID="2">
          <Transform scaleX="1" scaleY="1" transX="0" transY="0"/>
          <ColorTransform2 factorRed="0" factorGreen="0" factorBlue="0" 
factorAlpha="256" offsetRed="255" offsetGreen="0" offsetBlue="0" 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]