RESOLVED FIXED22163
[QT] GraphicsContext's currenPath can be transformed
https://bugs.webkit.org/show_bug.cgi?id=22163
Summary [QT] GraphicsContext's currenPath can be transformed
Dirk Schulze
Reported 2008-11-10 14:27:21 PST
The currenPath of the GraphicsContext is transformed, when the GraphicsContext is transformed. That shouldn't be the case. The path will be drawn using the CTM but shouldn't be transformed itself. Only beginPath should respect the CTM.
Attachments
Undo the transformation (2.22 KB, patch)
2008-11-10 14:40 PST, Dirk Schulze
no flags
theoretical tests (855 bytes, text/plain)
2008-11-19 00:23 PST, Dirk Schulze
no flags
Undo the transformation (3.62 KB, patch)
2008-11-19 00:25 PST, Dirk Schulze
no flags
Undo the transformation (4.38 KB, patch)
2008-11-19 07:09 PST, Dirk Schulze
no flags
Undo the transformation (4.88 KB, patch)
2008-11-19 09:17 PST, Dirk Schulze
hausmann: review+
Dirk Schulze
Comment 1 2008-11-10 14:40:02 PST
Created attachment 25027 [details] Undo the transformation This patch just undo the transformation to the path. That means new path's still respect the CTM and transformations to the context don't influence the current path.
Dirk Schulze
Comment 2 2008-11-19 00:23:23 PST
Created attachment 25259 [details] theoretical tests That are some theoretical test cases. There should be a green rectangle on the top left.
Dirk Schulze
Comment 3 2008-11-19 00:25:56 PST
Created attachment 25260 [details] Undo the transformation This patch should match all test cases above.
Dirk Schulze
Comment 4 2008-11-19 07:09:23 PST
Created attachment 25267 [details] Undo the transformation Update Path had to be cleared after the drawing. Added speed up by asking if currentPath is empty before all types of transformation.
Simon Hausmann
Comment 5 2008-11-19 07:28:16 PST
I think the patch looks good, but I also think that "affine" should be called "pathTransform" or so instead. A slightly more descriptive name that relates to the use of the transform with the gc's path.
Dirk Schulze
Comment 6 2008-11-19 09:17:30 PST
Created attachment 25273 [details] Undo the transformation You're right. I changed affine to pathTransform.
Simon Hausmann
Comment 7 2008-11-19 23:34:12 PST
Comment on attachment 25273 [details] Undo the transformation Great stuff Dirk :)
Dirk Schulze
Comment 8 2008-11-26 07:34:53 PST
landed in r38785.
Note You need to log in before you can comment on or make changes to this bug.