Function

CGContextRotateCTM

Rotates the user coordinate system in a context.

Declaration

void CGContextRotateCTM(CGContextRef c, CGFloat angle);

Parameters

c

A graphics context.

angle

The angle, in radians, by which to rotate the coordinate space of the specified context. Positive values rotate counterclockwise and negative values rotate clockwise.)

Discussion

The direction that the context is rotated may appear to be altered by the state of the current transformation matrix prior to executing this function. For example, on iOS, a UIView applies a transformation to the graphics context that inverts the Y-axis (by multiplying it by -1). Rotating the user coordinate system on coordinate system that was previously flipped results in a rotation in the opposite direction (that is, positive values appear to rotate the coordinate system in the clockwise direction).

See Also

Transforming User Space

CGContextConcatCTM

Transforms the user coordinate system in a context using a specified matrix.

CGContextGetCTM

Returns the current transformation matrix.

CGContextScaleCTM

Changes the scale of the user coordinate system in a context.

CGContextTranslateCTM

Changes the origin of the user coordinate system in a 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