Bug 16516

Summary: canvas image patterns stop working with some transformations
Product: WebKit Reporter: Ilmari Heikkinen <ilmari.heikkinen@gmail.com>
Component: Layout and RenderingAssignee: Oliver Hunt <oliver@apple.com>
Status: RESOLVED FIXED    
Severity: Normal CC: mitz@webkit.org
Priority: P2    
Version: 523.x (Safari 3)   
Hardware: PC   
OS: Windows XP   
Attachments:
Description Flags
Testcase for transformed image patterns
none
Fixeration! sam: review+

Description From 2007-12-19 11:16:18 PST
HTML canvas image patterns created with context.createPattern(image, 'no-repeat') don't work after translating and rotating. 

E.g.
    p = ctx.createPattern(myImage, 'no-repeat');
    ctx.translate(200, 0);
    ctx.rotate(Math.PI/8);
    ctx.fillStyle = p;
    ctx.fillRect(0,0, 215, 174);

Patterns created with 'repeat' work.
------- Comment #1 From 2007-12-19 11:19:24 PST -------
Created an attachment (id=17993) [details]
Testcase for transformed image patterns
------- Comment #2 From 2007-12-19 14:42:02 PST -------
This might be a bug in CoreGraphics.
------- Comment #3 From 2007-12-30 20:24:32 PST -------
The magic values from <http://trac.webkit.org/projects/webkit/changeset/13384> do not work for the test case. Of course, the old values of 0, 0 do not work for other cases (as demonstrated by bug 7830).
------- Comment #4 From 2008-03-08 22:24:47 PST -------
Created an attachment (id=19614) [details]
Fixeration!
------- Comment #5 From 2008-03-08 22:50:08 PST -------
Landed r30905