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


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



The graphics context in which to draw the image.


A rectangle that specifies the origin and size of the destination tile. The image is scaled—disproportionately, if necessary—to fit the bounds specified by the rect parameter.


The image to draw.


Core Graphics draws the scaled image starting at the origin of the rectangle in user space, then moves to a new point (horizontally by the width of the tile and/or vertically by the height of the tile), draws the scaled image, moves again, draws again, and so on, until the current clip region is tiled with copies of the image. Unlike patterns, the image is tiled in user space, so transformations applied to the CTM affect the final result.

See Also

Drawing an Image to a Graphics Context


Draws an image into a graphics context.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software