Closed
Bug 401790
Opened 17 years ago
Closed 13 years ago
Canvas globalAlpha not applied to pattern fills
Categories
(Core :: Graphics: Canvas2D, defect, P1)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: philip, Unassigned)
References
()
Details
Attachments
(2 files)
3.96 KB,
patch
|
vlad
:
review+
|
Details | Diff | Splinter Review |
1.76 KB,
text/html
|
Details |
User-Agent: Opera/9.24 (X11; Linux i686; U; en)
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a9pre) Gecko/2007103004 Minefield/3.0a9pre
Canvas pattern fills are not affected by globalAlpha.
Reproducible: Always
Steps to Reproduce:
1. fillStyle = createPattern(...)
2. globalAlpha != 1
3. fill()
Actual Results:
globalAlpha is ignored, and the pattern is drawn as if globalAlpha=1.
Expected Results:
globalAlpha should affect the pattern.
Same results on Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a9pre) Gecko/2007103004 Minefield/3.0a9pre
Comment 1•17 years ago
|
||
Comment 2•17 years ago
|
||
Updated•17 years ago
|
Attachment #290728 -
Flags: review?
Comment 3•17 years ago
|
||
Ilmari: you'll need to request review from a specific person if you don't want the review request to be lost. See http://developer.mozilla.org/en/docs/Getting_your_patch_in_the_tree . I recommend vladimir@pobox.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Updated•17 years ago
|
Attachment #290728 -
Flags: review? → review?(vladimir)
Comment 4•17 years ago
|
||
Gavin: Aahh, thanks! So that's what the requestee field is for (I thought it'd go to the module maintainer if left blank.) Fixed.
Comment on attachment 290728 [details] [diff] [review]
Makes canvas globalAlpha apply to pattern fill and stroke.
Oy, sorry I haven't seen this yet! Patch looks fine, though I don't understand < 0.999 -- why not just < 1.0 ? Is the worry that we'll get a computed alpha value within epsilon of 1.0 that should really be treated as 1.0 for speed?
Attachment #290728 -
Flags: review?(vladimir) → review+
Comment 6•17 years ago
|
||
Yes, speed^H^H^H^H^H premature optimization. Though I guess it should be < 1.0 - (1.0 / (1 << ALPHA_BIT_DEPTH)) instead.
Updated•17 years ago
|
Priority: -- → P1
Comment 7•13 years ago
|
||
This seems to be fixed.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•