开发者

How can I do `pushMatrix` or `popMatrix` of GL in CoreGraphics?

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().

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜