[Webkit-unassigned] [Bug 12150] The cases where no stops are defined, or when a stop offset is less than previous not handled correctly

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Jan 7 13:58:24 PST 2007


http://bugs.webkit.org/show_bug.cgi?id=12150


macdome at opendarwin.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever Confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW




------- Comment #4 from macdome at opendarwin.org  2007-01-07 13:58 PDT -------
This is covered in the spec, it seems:

Some notes on gradients:

Gradient offset values less than 0 (or less than 0%) are rounded up to 0%.
Gradient offset values greater than 1 (or greater than 100%) are rounded down
to 100%.
It is necessary that at least two stops defined to have a gradient effect. If
no stops are defined, then painting shall occur as if 'none' were specified as
the paint style. If one stop is defined, then paint with the solid color fill
using the color defined for that gradient stop.
Each gradient offset value is required to be equal to or greater than the
previous gradient stop's offset value. If a given gradient stop's offset value
is not equal to or greater than all previous offset values, then the offset
value is adjusted to be equal to the largest of all previous offset values.
If two gradient stops have the same offset value, then the latter gradient stop
controls the color value at the overlap point. In particular:
<stop offset="0" stop-color="white"/>
<stop offset=".2" stop-color="red"/>
<stop offset=".2" stop-color="blue"/>
<stop offset="1" stop-color="black"/>
will have approximately the same effect as:
<stop offset="0" stop-color="white"/>
<stop offset=".1999999999" stop-color="red"/>
<stop offset=".2" stop-color="blue"/>
<stop offset="1" stop-color="black"/>
which is a gradient that goes smoothly from white to red, then abruptly shifts
from red to blue, and then goes smoothly from blue to black.


-- 
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list