There is one more very important reason that I didn't touch on
before about why you wouldn't want to invert the CTM in order to
get back to identity -- the context may not have started out with
the identity transformation.
HIView sets up your context such that the CTM gives you a
coordinate system that looks like Quickdraw. Take the inverse of
the CTM and you will get the default coordinate system instead of
the Quickdraw one you may be expecting.
Additionally, there is Resolution Independence. This is generally
implemented in the frameworks by scaling the CGContext
appropriately -- inverting the CTM will defeat this feature.
Someday when your users have control over this feature they will
run your application and wonder why some of the drawing is tiny :).
That's why it would be a great idea if there was a call like
CGContextRevertToBaseCTM(CGContextRef c) which would set the identity
matrix plus whatever normal transforms are needed for RI and such. I
haven't needed it, so I haven't submitted a radar requesting it. But
the OP might want to.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden