In GL, I have used some kind of this stuff,
glMatrixMode(GL_MODELVIEW);
glLoadId开发者_如何转开发entity();
glPushMatrix();
glTranslatef();
// Do something
glPopMatrix();
To make and work in a derived coordinate system. How can I archive this functionality in CoreGraphics?
I suspect you’re talking about OpenGL ES, in which case you should go and check out this previous answer.
If you’re really talking about CoreGraphics check out CGContextSaveGState()
and CGContextRestoreGState()
.
精彩评论