ioscore-graphicsquartz-graphics

How Scale context from center in Core Graphics?


I'm drawing with Core Graphics and I need to scale down the current context. I use the CGContextScaleCTM function but this use de origin and not the center. How can I make scale from center?


Solution

  • After you have scaled you can use CGContextTranslateCTM to move the context to wherever you like.