Bug 16516

Summary: canvas image patterns stop working with some transformations
Product: WebKit Reporter: Ilmari Heikkinen <ilmari.heikkinen>
Component: Layout and RenderingAssignee: Oliver Hunt <oliver>
Status: RESOLVED FIXED    
Severity: Normal CC: mitz
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 Ilmari Heikkinen 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 Ilmari Heikkinen 2007-12-19 11:19:24 PST
Created attachment 17993 [details]
Testcase for transformed image patterns
Comment 2 mitz@webkit.org 2007-12-19 14:42:02 PST
This might be a bug in CoreGraphics.
Comment 3 mitz@webkit.org 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 Oliver Hunt 2008-03-08 22:24:47 PST
Created attachment 19614 [details]
Fixeration!
Comment 5 Oliver Hunt 2008-03-08 22:50:08 PST
Landed r30905