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.
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.
Created attachment 25259 [details] theoretical tests That are some theoretical test cases. There should be a green rectangle on the top left.
Created attachment 25260 [details] Undo the transformation This patch should match all test cases above.
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.
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.
Created attachment 25273 [details] Undo the transformation You're right. I changed affine to pathTransform.
Comment on attachment 25273 [details] Undo the transformation Great stuff Dirk :)
landed in r38785.