1

In GL, I have used some kind of this stuff,

glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glPushMatrix();
glTranslatef();

// Do something

glPopMatrix();

To make and work in a derived coordinate system. How can I archive this functionality in CoreGraphics?

eonil
  • 83,476
  • 81
  • 317
  • 516

1 Answers1

2

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

Community
  • 1
  • 1
Ben Stiglitz
  • 3,994
  • 27
  • 24