[Laszlo-dev] For Review: Change 20090206-Philip-a. Summary: Make fgcolor/bgcolor work the same in all runtimes

Philip Romanik promanik at laszlosystems.com
Sat Feb 7 06:50:32 PST 2009


Did I go too far with this changeset? setColor() and 
setColorTransform() do pretty much the same thing in swf.

I haven't checked in my changes so if you run this example you'll see 
the solid red box in swf (rather than red text on a blue background 
that I would expect).

<canvas>
   <view width="100" height="100" fgcolor="red">
     <text bgcolor="blue">Hello</text>
   </view>
</canvas>

Thanks!

Phil


>FYI, setColor() used to be a transform that changed _everything_ to 
>the color including resources, at least in swf...
>
>Philip Romanik wrote:
> > Change 20090206-Philip-a by Philip at Philip-DC on 2009-02-06 10:03:38 EST
> >     in /cygdrive/f/laszlo/svn/src/svn/openlaszlo/trunk
> >     for 
> <http://svn.openlaszlo.org/openlaszlo/trunk>http://svn.openlaszlo.org/openlaszlo/trunk
> >
> > Summary: Make fgcolor/bgcolor work the same in all runtimes
> >
> > New Features:
> >
> > Bugs Fixed: LPP-7481 LPP-7490
> >
> > Technical Reviewer: ptw
> > QA Reviewer: (pending)
> > Doc Reviewer: (pending)
> >
> > Documentation:
> >
> > Release Notes:
> >
> > Details:
> > According to the docs, a view's fgcolor applies to any contained views.
> > I took the approach taken by font (and fontsize, fontstyle) to
> > traverse the view hierarchy in construct() to find if fgcolor was
> > specified. Any runtime changes made to a parent view will not 
> change fgcolor of a child.
> >
> > LaszloView.lzs
> >   - Set hasfgcolor if the view specifies fgcolor LzText.lzs
> >   - In construct(), get fgcolor from a parent swf/LzSprite.as
> >   - Don't write the fgcolor to the color transform. Doing so adjusts
> > all color values (including the background).
> > swf/LzTextSprite.as
> >   - Added getColor override because the text sprite stores the color
> > differently than LzSprite.
> >
> >
> > Tests:
> >   See LPP-7490 for an app. The app produces the same output in all
> > runtimes. Textheight has an issue in swf9 but this is from something else.
> >   smoketest passes in all runtimes (there is one error in swf9 from
> > something else).
> >   lzpix
> >
> > Files:
> > M      WEB-INF/lps/lfc/kernel/swf/LzTextSprite.as
> > M      WEB-INF/lps/lfc/kernel/swf/LzSprite.as
> > M      WEB-INF/lps/lfc/views/LzText.lzs
> > M      WEB-INF/lps/lfc/views/LaszloView.lzs
> >
> > Changeset:
> > 
> <http://svn.openlaszlo.org/openlaszlo/patches/20090206-Philip-a.tar>http://svn.openlaszlo.org/openlaszlo/patches/20090206-Philip-a.tar
> >
>
>--
>Regards,
>Max Carlson
>OpenLaszlo.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.openlaszlo.org/pipermail/laszlo-dev/attachments/20090207/14dc41e2/attachment-0001.html


More information about the Laszlo-dev mailing list