CGContextRestoreGState
CGContextRestoreGState is a Core Graphics function that restores the graphics state of a given drawing context from a stack of saved states. It replaces the current graphics state with the most recently saved state and pops that saved copy off the stack.
The function is designed to be paired with CGContextSaveGState. A common pattern is to save the current
Attributes that are part of the graphics state and thus restored include the current transform (CTM), clipping
Notes and limitations: the function operates on a per-context graphics state stack and must be balanced with