I'm currently making a graphical application, and it will make my life a lot easier if I simply flip the context's transform matrix upside down whenever I want to draw something upside down, which is quite frequently. However, the only command I can find that supports this is CGContextScaleCTM. This is fine I guess, but it's an additive (well, multiplicative) process. If I scale it to 50% size, I then have to know that I've done that and enlarge it to 200% size after, which means retrieving the current matrix and doing a spot of mathematics every time I want to reset it to its original state of {1,0,0,1,0,0} which is also pretty darn often. There seem to be ways of doing this programmatically, but it seems extremely wasteful to spend processor time getting, fetching and multiplying matrices when all I really need to do is set the current transformation matrix to its absolute value.
However, I'm having great trouble discovering HOW, and it's really, really silly. I assume that the transformation matrix is stored somewhere in the CGContextRef structure as a CGAffineTransform, but I can't find a good document anywhere to tell me what its name is so that I can set it manually, and I don't even know if this would work. Can anyone help on this front?
-Ash