When you create a PDF graphics context and draw to that context, Quartz records your drawing as a series of PDF drawing commands written to a file.
You supply a location for the PDF output and a default media box—a rectangle that specifies bounds of the page.
CGLayer objects (CGLayerRef
) are optimized for offscreen drawing because, whenever possible, Quartz caches layers on the video card.