Instance Method

convertPoint:fromLayer:

Converts the point from the specified layer’s coordinate system to the receiver’s coordinate system.

Declaration

- (CGPoint)convertPoint:(CGPoint)p fromLayer:(CALayer *)l;

Parameters

p

A point specifying a location in the coordinate system of l.

l

The layer with p in its coordinate system. The receiver and l and must share a common parent layer. This parameter may be nil.

Return Value

The point converted to the receiver’s coordinate system.

Discussion

If you specify nil for the l parameter, this method returns the original point subtracted from the layer's frame's origin.

See Also

Mapping Between Coordinate and Time Spaces

- convertPoint:toLayer:

Converts the point from the receiver’s coordinate system to the specified layer’s coordinate system.

- convertRect:fromLayer:

Converts the rectangle from the specified layer’s coordinate system to the receiver’s coordinate system.

- convertRect:toLayer:

Converts the rectangle from the receiver’s coordinate system to the specified layer’s coordinate system.

- convertTime:fromLayer:

Converts the time interval from the specified layer’s time space to the receiver’s time space.

- convertTime:toLayer:

Converts the time interval from the receiver’s time space to the specified layer’s time space

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