gnash-commit
[Top][All Lists]
Advanced

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

Re: [Gnash-commit] /srv/bzr/gnash/trunk r10784: Don't clamp color value


From: Benjamin Wolsey
Subject: Re: [Gnash-commit] /srv/bzr/gnash/trunk r10784: Don't clamp color value in MovieClip.lineStyle. Fixes pollock.swf.
Date: Mon, 13 Apr 2009 12:47:45 +0200

Am Montag, den 13.04.2009, 12:22 +0200 schrieb Benjamin Wolsey:
> >          case 2:
> >          {
> >              boost::uint32_t rgbval = boost::uint32_t(
> > -                clamp<float>(fn.arg(1).to_number(), 0, 16777216));
> > +                // See pollock.swf:
> > +                // it gets too many black colors with the clamp;
> > +                // it sets color to a random number from
> > +                // 0 to 160000000 (about 10 times more then the max).
> > +                // I guess the correct behaviour is a different
> > handling
> > +                // of the overflow. Letting the compiler decide on
> > that
> > +                // gives better results.

In fact, to_int() instead of to_number() might work here, as it also
truncates; probably depends what's supposed to happen with the alpha
byte.

bwy





reply via email to

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