Bug 16516 - canvas image patterns stop working with some transformations
Summary: canvas image patterns stop working with some transformations
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 523.x (Safari 3)
Hardware: PC Windows XP
: P2 Normal
Assignee: Oliver Hunt
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-19 11:16 PST by Ilmari Heikkinen
Modified: 2008-03-08 22:50 PST (History)
1 user (show)

See Also:


Attachments
Testcase for transformed image patterns (1.16 KB, text/html)
2007-12-19 11:19 PST, Ilmari Heikkinen
no flags Details
Fixeration! (4.86 KB, patch)
2008-03-08 22:24 PST, Oliver Hunt
sam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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