Bug 81528 - Applying stroke with globalCompositeOperation set to source-in, source-out, destination-in, destination-atop, copy displays incorrectly
Summary: Applying stroke with globalCompositeOperation set to source-in, source-out, d...
Status: RESOLVED DUPLICATE of bug 66762
Alias: None
Product: WebKit
Classification: Unclassified
Component: Canvas (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows 7
: P2 Normal
Assignee: Nobody
URL: http://jsfiddle.net/dH7KW/
Keywords: HTML5
Depends on:
Blocks:
 
Reported: 2012-03-19 11:15 PDT by Jim Allanson
Modified: 2012-03-27 01:37 PDT (History)
0 users

See Also:


Attachments
Expected behaviour, as tested in Firefox 10, IE 10, Opera 11 (22.07 KB, image/png)
2012-03-19 11:15 PDT, Jim Allanson
no flags Details
Incorrect Rendering in Webkit (22.65 KB, image/png)
2012-03-19 11:16 PDT, Jim Allanson
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jim Allanson 2012-03-19 11:15:50 PDT
Created attachment 132612 [details]
Expected behaviour, as tested in Firefox 10, IE 10, Opera 11

When a stroke is applied to a canvas with the globalCompositeOperation set to:

- source-in
- source-out
- destination-in
- destination-atop
- copy

The composition does not occur as expected, with the destination image still visible where it should not be.

Reference rendering from Mozilla Firefox 10: http://i.imgur.com/zoQsB.png (Identical to IE 10 & Opera 11)
Webkit rendering: http://i.imgur.com/NiNpO.png

jsFiddle testing stroke composition for each globalCompositeOperation: http://jsfiddle.net/dH7KW/
Comment 1 Jim Allanson 2012-03-19 11:16:45 PDT
Created attachment 132613 [details]
Incorrect Rendering in Webkit
Comment 2 Jim Allanson 2012-03-27 01:28:26 PDT
I forgot to mention in the original report, this is fairly easy to work around. Just create a new Canvas element, apply the stroke to it, then draw that canvas to the destination using drawImage() with the desired globalCompositeOperation set.
Comment 3 Jim Allanson 2012-03-27 01:37:02 PDT
Duplicate of bug 66762, missed this the first time I searched.

*** This bug has been marked as a duplicate of bug 66762 ***