Function

CGContextDrawImage

Draws an image into a graphics context.

Declaration

void CGContextDrawImage(CGContextRef c, CGRect rect, CGImageRef image);

Parameters

c

The graphics context in which to draw the image.

rect

The location and dimensions in user space of the bounding box in which to draw the image.

image

The image to draw.

Discussion

The image is scaled—disproportionately, if necessary—to fit the bounds specified by the rect parameter.

See Also

Drawing an Image to a Graphics Context

CGContextDrawTiledImage

Repeatedly draws an image, scaled to the provided rectangle, to fill the current clip region.