CALayer Class Reference
List of all members.
Detailed Description
A CALayer is similar to a CPView, but with the ability to have a transform applied to it.
-(void)drawLayer:(CALayer)layer inContext:(CGContextRef)ctx; If the delegate implements this method, the CALayer will call this in place of its -drawInContext
:.
- Parameters:
-
| layer | the layer to draw for |
| ctx | the context to draw on |
-(void)displayLayer:(CALayer)layer; The delegate can override the layer's -display
method by implementing this method.
Definition at line 67 of file CALayer.j.
Member Function Documentation
- (void) addSublayer: |
|
(CALayer) |
aLayer |
|
[implementation] |
Adds the specified layer as a sublayer of the receiver.
Definition at line 654 of file CALayer.j.
- (CGAffineTransform) affineTransform |
|
|
|
[implementation] |
Returns the layer's affine transform.
Definition at line 298 of file CALayer.j.
- (CGPoint) anchorPoint |
|
|
|
[implementation] |
Returns the layer's anchor point.
Definition at line 276 of file CALayer.j.
- (CPColor) backgroundColor |
|
|
|
[implementation] |
Returns the layer's background color.
Definition at line 625 of file CALayer.j.
- (CGRect) backingStoreFrame |
|
|
|
[implementation] |
The Backing Store Frame specifies the frame of the actual backing store used to contain this layer. Naturally, by default it is the same as the frame, however, users can specify their own custom Backing Store Frame in order to speed up certain operations, such as live transformation.
- Returns:
- the backing store frame
Definition at line 379 of file CALayer.j.
- (CGRect) bounds |
|
|
|
[implementation] |
Returns the layer's bound.
Definition at line 208 of file CALayer.j.
- (void) composite |
|
|
|
[implementation] |
- (BOOL) containsPoint: |
|
(CGPoint) |
aPoint |
|
[implementation] |
Returns YES
if the layer contains the point.
- Parameters:
-
Definition at line 911 of file CALayer.j.
- (CGImage) contents |
|
|
|
[implementation] |
Returns the CGImage contents of this layer. The default contents are nil
.
Definition at line 424 of file CALayer.j.
- (CGPoint) convertPoint: |
|
(CGPoint) |
aPoint |
fromLayer: |
|
(CALayer) |
aLayer | |
|
|
| | [implementation] |
Converts the point from the specified layer's coordinate system into the receiver's coordinate system.
- Parameters:
-
| aPoint | the point to convert |
| aLayer | the layer coordinate system to convert from |
- Returns:
- the converted point
Definition at line 868 of file CALayer.j.
- (CGPoint) convertPoint: |
|
(CGPoint) |
aPoint |
toLayer: |
|
(CALayer) |
aLayer | |
|
|
| | [implementation] |
Converts the point from the receiver's coordinate system to the specified layer's coordinate system.
- Parameters:
-
| aPoint | the point to convert |
| aLayer | the layer coordinate system to convert to |
- Returns:
- the converted point
Definition at line 879 of file CALayer.j.
- (CGRect) convertRect: |
|
(CGRect) |
aRect |
fromLayer: |
|
(CALayer) |
aLayer | |
|
|
| | [implementation] |
Converts the rectangle from the specified layer's coordinate system to the receiver's coordinate system.
- Parameters:
-
| aRect | the rectangle to convert |
| aLayer | the layer coordinate system to convert from |
- Returns:
- the converted rectangle
Definition at line 890 of file CALayer.j.
- (CGRect) convertRect: |
|
(CGRect) |
aRect |
toLayer: |
|
(CALayer) |
aLayer | |
|
|
| | [implementation] |
Converts the rectangle from the receier's coordinate system to the specified layer's coordinate system.
- Parameters:
-
| aRect | the rectange to convert |
| aLayer | the layer coordinate system to convert to |
- Returns:
- the converted rectangle
Definition at line 901 of file CALayer.j.
- (id) delegate |
|
|
|
[implementation] |
Returns the layer's delegate
Definition at line 965 of file CALayer.j.
- (void) display |
|
|
|
[implementation] |
Displays the contents of this layer.
Definition at line 486 of file CALayer.j.
- (void) drawInContext: |
|
(CGContext) |
aContext |
|
[implementation] |
Draws this layer's contents into the specified context.
- Parameters:
-
| aContext | the context to draw the layer into |
Definition at line 534 of file CALayer.j.
- (CGRect) frame |
|
|
|
[implementation] |
Returns the layer's frame.
The frame defines the bounding box of the layer: the smallest possible rectangle that could fit this layer after transform properties are applied in superlayer coordinates.
Definition at line 363 of file CALayer.j.
- (BOOL) hidden |
|
|
|
[implementation] |
Returns YES
if the layer is hidden.
Definition at line 585 of file CALayer.j.
- (CALayer) hitTest: |
|
(CGPoint) |
aPoint |
|
[implementation] |
Returns the farthest descendant of this layer that contains the specified point.
- Parameters:
-
- Returns:
- the containing layer or
nil
if there was no hit.
Definition at line 921 of file CALayer.j.
- (id) init |
|
|
|
[implementation] |
Initializes the animation layer.
Definition at line 133 of file CALayer.j.
- (void) insertSublayer: |
|
(CALayer) |
aLayer |
above: |
|
(CALayer) |
aSublayer | |
|
|
| | [implementation] |
Inserts a layer above another layer.
- Parameters:
-
| aLayer | the layer to insert |
| aSublayer | the layer to insert above |
- Exceptions:
-
| CALayerNotFoundException | if aSublayer is not in the array of sublayers |
Definition at line 742 of file CALayer.j.
- (void) insertSublayer: |
|
(CALayer) |
aLayer |
atIndex: |
|
(unsigned) |
anIndex | |
|
|
| | [implementation] |
Inserts the specified layer as a sublayer into the specified index.
- Parameters:
-
| aLayer | the layer to insert |
| anIndex | the index to insert the layer at |
Definition at line 686 of file CALayer.j.
- (void) insertSublayer: |
|
(CALayer) |
aLayer |
below: |
|
(CALayer) |
aSublayer | |
|
|
| | [implementation] |
Inserts a layer below another layer.
- Parameters:
-
| aLayer | the layer to insert |
| aSublayer | the layer to insert below |
- Exceptions:
-
| CALayerNotFoundException | if aSublayer is not in the array of sublayers |
Definition at line 729 of file CALayer.j.
- (BOOL) isHidden |
|
|
|
[implementation] |
Returns YES
if the layer is hidden.
Definition at line 593 of file CALayer.j.
Returns a new animation layer.
Definition at line 125 of file CALayer.j.
- (BOOL) needsDisplayOnBoundsChange |
|
|
|
[implementation] |
Returns YES
if the display should be redrawn on a bounds change.
Definition at line 846 of file CALayer.j.
- (float) opacity |
|
|
|
[implementation] |
Returns the opacity of the layer. The value is between 0.0
(transparent) and 1.0
(opaque).
Definition at line 552 of file CALayer.j.
- (CGPoint) position |
|
|
|
[implementation] |
Returns the layer's position
Definition at line 230 of file CALayer.j.
- (void) registerRunLoopUpdateWithMask: |
|
(unsigned) |
anUpdateMask |
|
[implementation] |
- (void) removeFromSuperlayer |
|
|
|
[implementation] |
Removes the receiver from its superlayer.
Definition at line 667 of file CALayer.j.
- (void) replaceSublayer: |
|
(CALayer) |
aSublayer |
with: |
|
(CALayer) |
aLayer | |
|
|
| | [implementation] |
Replaces a sublayer.
- Parameters:
-
| aSublayer | the layer to insert |
| aLayer | the layer to replace |
Definition at line 756 of file CALayer.j.
+ (void) runLoopUpdateLayers |
|
|
|
[implementation] |
- (void) setAffineTransform: |
|
(CGAffineTransform) |
anAffineTransform |
|
[implementation] |
Sets the affine transform applied to this layer.
- Parameters:
-
| anAffineTransform | the new affine transform |
Definition at line 285 of file CALayer.j.
- (void) setAnchorPoint: |
|
(CGPoint) |
anAnchorPoint |
|
[implementation] |
Sets the layer's anchor point. The default point is [0.5, 0.5].
- Parameters:
-
| anAnchorPoint | the layer's new anchor point |
Definition at line 253 of file CALayer.j.
- (void) setBackgroundColor: |
|
(CPColor) |
aColor |
|
[implementation] |
Sets the layer's background color.
- Parameters:
-
| aColor | the new background color |
Definition at line 615 of file CALayer.j.
- (void) setBackingStoreFrame: |
|
(CGRect) |
aFrame |
|
[implementation] |
Sets the frame's backing store.
- Parameters:
-
| aFrame | the new backing store. |
Definition at line 388 of file CALayer.j.
- (void) setBounds: |
|
(CGRect) |
aBounds |
|
[implementation] |
Sets the bounds (origin and size) of the rectangle.
- Parameters:
-
| aBounds | the new bounds for the layer |
Definition at line 180 of file CALayer.j.
- (void) setContents: |
|
(CGImage) |
contents |
|
[implementation] |
Sets the image contents of this layer.
- Parameters:
-
| contents | the image to display |
Definition at line 433 of file CALayer.j.
- (void) setDelegate: |
|
(id) |
aDelegate |
|
[implementation] |
Sets the delegate for this layer.
- Parameters:
-
Definition at line 948 of file CALayer.j.
- (void) setFrame: |
|
(CGRect) |
aFrame |
|
[implementation] |
Sets the frame of the layer. The frame defines a bounding rectangle in the superlayer's coordinate system.
- Parameters:
-
| aFrame | the new frame rectangle |
Definition at line 351 of file CALayer.j.
- (void) setHidden: |
|
(BOOL) |
isHidden |
|
[implementation] |
Sets whether the layer is hidden.
- Parameters:
-
| isHidden | YES means the layer will be hidden. NO means the layer will be visible. |
Definition at line 576 of file CALayer.j.
- (void) setMasksToBounds: |
|
(BOOL) |
masksToBounds |
|
[implementation] |
Sets whether content that goes lies outside the bounds is hidden or visible.
- Parameters:
-
| masksToBounds | YES hides the excess content. NO makes it visible. |
Definition at line 602 of file CALayer.j.
- (void) setNeedsComposite |
|
|
|
[implementation] |
- (void) setNeedsDisplay |
|
|
|
[implementation] |
Marks the layer as needing to be redrawn.
Definition at line 829 of file CALayer.j.
- (void) setNeedsDisplayInRect: |
|
(CGRect) |
aRect |
|
[implementation] |
Marks the specified rectange as needing to be redrawn.
- Parameters:
-
| aRect | the area that needs to be redrawn. |
Definition at line 855 of file CALayer.j.
- (void) setNeedsDisplayOnBoundsChange: |
|
(BOOL) |
needsDisplayOnBoundsChange |
|
[implementation] |
Sets whether the layer needs to be redrawn when its bounds are changed.
- Parameters:
-
| needsDisplayOnBoundsChange | YES means the display is redraw on a bounds change. |
Definition at line 838 of file CALayer.j.
- (void) setOpacity: |
|
(float) |
anOpacity |
|
[implementation] |
Sets the opacity for the layer.
- Parameters:
-
| anOpacity | the new opacity (between 0.0 (transparent) and 1.0 (opaque)). |
Definition at line 561 of file CALayer.j.
- (void) setPosition: |
|
(CGPoint) |
aPosition |
|
[implementation] |
Sets the layer's position.
- Parameters:
-
| aPosition | the layer's new position |
Definition at line 217 of file CALayer.j.
- (void) setSublayerTransform: |
|
(CGAffineTransform) |
anAffineTransform |
|
[implementation] |
Sets the affine transform that gets applied to all the sublayers.
- Parameters:
-
| anAffineTransform | the transform to apply to sublayers |
Definition at line 307 of file CALayer.j.
- (void) setZPosition: |
|
(int) |
aZPosition |
|
[implementation] |
Sets the layer's z-ordering.
- Parameters:
-
| aZPosition | the layer's new z-ordering |
Definition at line 239 of file CALayer.j.
- (CPArray) sublayers |
|
|
|
[implementation] |
Returns an array of the receiver's sublayers.
Definition at line 634 of file CALayer.j.
- (CGAffineTransform) sublayerTransform |
|
|
|
[implementation] |
Returns the affine transform applied to the sublayers.
Definition at line 332 of file CALayer.j.
- (CALayer) superlayer |
|
|
|
[implementation] |
Returns the receiver's superlayer.
Definition at line 642 of file CALayer.j.
- (CGAffineTransform) transformToLayer |
|
|
|
[implementation] |
The documentation for this class was generated from the following file: