CGContext
CGContext is a Core Graphics drawing destination and state container used on Apple platforms to render graphics. It provides the routines and state needed to draw shapes, images, and text into a destination such as a view, layer, bitmap, or PDF document. A context may be created for offscreen rendering (a bitmap or PDF context) or obtained from the system for onscreen drawing during a view’s drawing cycle.
Contexts come in device-based forms provided by the system (for example, during a view’s draw cycle) and
The drawing model centers on paths and primitives. Developers construct paths using functions such as CGContextMoveToPoint,
CGContext supports drawing images through functions like CGContextDrawImage, and can render gradients and patterns via additional
CGContext is a foundational element of Core Graphics, providing low-level, high-performance drawing capabilities that underpin many