Because the end result is an image, however, Core Image gradients may be less desirable for PDF and other print-based drawing.To draw a Quartz shading in your Cocoa program, you would do the following from your drawRect: method:Get a CGContextRef using the graphicsPort method of NSGraphicsContext. (You will pass this reference to other Quartz functions.)Create a CGShadingRef using Quartz; see Grad