Summary: | canvas transform matrix does not apply to patterns | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Randy Reddig <ydnar> | ||||
Component: | Layout and Rendering | Assignee: | Anders Carlsson <andersca> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | ||||||
Priority: | P2 | ||||||
Version: | 412 | ||||||
Hardware: | PC | ||||||
OS: | Windows 2000 | ||||||
URL: | http://dev.shaderlab.com/test/canvas/scanlines.html | ||||||
Attachments: |
|
Description
Randy Reddig
2005-06-19 22:18:25 PDT
What's ambiguous? Whether patterns (or gradients) are subject to transformation. The document does not specify. "The transformation matrix is applied to all drawing operations prior to their being rendered." Okay, so you agree that Safari's behavior is incorrect then? I've no idea what Safari does, but if it ignores the transformation matrix when painting patterns, then I'd say yes. Then i'll say yes too :) This is also in Radar as <rdar://problem/4161599> Created attachment 2930 [details]
Create patterns lazily
Here's a patch that changes the behavior so that fill and stroke patterns are
created in the respective fill and stroke functions using the current CTM.
It might be interesting to compare this with how I did the (incomplete) pattern code for KCanvas. The same fixes might be applicable there. The file in question is WebCore/kcanvas/device/quartz/KRenderingPaintServerQuartz.mm Comment on attachment 2930 [details]
Create patterns lazily
r=me
Landed this patch |