API 0.9.5
CALayer Class Reference

#import <CALayer.h>

Inheritance diagram for CALayer:

List of all members.

Instance Methods

(void) - addSublayer:
(CGAffineTransform) - affineTransform
(CGPoint) - anchorPoint
(CPColor- backgroundColor
(CGRect) - backingStoreFrame
(CGRect) - bounds
(void) - composite
(BOOL) - containsPoint:
(CGImage) - contents
(CGPoint) - convertPoint:fromLayer:
(CGPoint) - convertPoint:toLayer:
(CGRect) - convertRect:fromLayer:
(CGRect) - convertRect:toLayer:
(id) - delegate
(void) - display
(void) - drawInContext:
(CGRect) - frame
(BOOL) - hidden
(CALayer- hitTest:
(id) - init
(void) - insertSublayer:above:
(void) - insertSublayer:atIndex:
(void) - insertSublayer:below:
(BOOL) - isHidden
(BOOL) - needsDisplayOnBoundsChange
(float) - opacity
(CGPoint) - position
(void) - registerRunLoopUpdateWithMask:
(void) - removeFromSuperlayer
(void) - replaceSublayer:with:
(void) - setAffineTransform:
(void) - setAnchorPoint:
(void) - setBackgroundColor:
(void) - setBackingStoreFrame:
(void) - setBounds:
(void) - setContents:
(void) - setDelegate:
(void) - setFrame:
(void) - setHidden:
(void) - setMasksToBounds:
(void) - setNeedsComposite
(void) - setNeedsDisplay
(void) - setNeedsDisplayInRect:
(void) - setNeedsDisplayOnBoundsChange:
(void) - setOpacity:
(void) - setPosition:
(void) - setSublayerTransform:
(void) - setZPosition:
(CPArray- sublayers
(CGAffineTransform) - sublayerTransform
(CALayer- superlayer
(CGAffineTransform) - transformToLayer

Class Methods

(CALayer+ layer
(void) + runLoopUpdateLayers

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:
layerthe layer to draw for
ctxthe context to draw on

-(void)displayLayer:(CALayer)layer; The delegate can override the layer's -display method by implementing this method.

Definition at line 2 of file CALayer.h.


Method Documentation

- (void) addSublayer: (CALayer aLayer

Adds the specified layer as a sublayer of the receiver.

Definition at line 652 of file CALayer.j.

- (CGAffineTransform) affineTransform

Returns the layer's affine transform.

Definition at line 291 of file CALayer.j.

- (CGPoint) anchorPoint

Returns the layer's anchor point.

Definition at line 269 of file CALayer.j.

- (CPColor) backgroundColor

Returns the layer's background color.

Definition at line 623 of file CALayer.j.

- (CGRect) backingStoreFrame

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 372 of file CALayer.j.

- (CGRect) bounds

Returns the layer's bound.

Definition at line 201 of file CALayer.j.

- (void) composite

Definition at line 440 of file CALayer.j.

- (BOOL) containsPoint: (CGPoint)  aPoint

Returns YES if the layer contains the point.

Parameters:
aPointthe point to test

Definition at line 909 of file CALayer.j.

- (CGImage) contents

Returns the CGImage contents of this layer. The default contents are nil.

Definition at line 417 of file CALayer.j.

- (CGPoint) convertPoint: (CGPoint)  aPoint
fromLayer: (CALayer aLayer 

Converts the point from the specified layer's coordinate system into the receiver's coordinate system.

Parameters:
aPointthe point to convert
aLayerthe layer coordinate system to convert from
Returns:
the converted point

Definition at line 866 of file CALayer.j.

- (CGPoint) convertPoint: (CGPoint)  aPoint
toLayer: (CALayer aLayer 

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

Parameters:
aPointthe point to convert
aLayerthe layer coordinate system to convert to
Returns:
the converted point

Definition at line 877 of file CALayer.j.

- (CGRect) convertRect: (CGRect)  aRect
fromLayer: (CALayer aLayer 

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

Parameters:
aRectthe rectangle to convert
aLayerthe layer coordinate system to convert from
Returns:
the converted rectangle

Definition at line 888 of file CALayer.j.

- (CGRect) convertRect: (CGRect)  aRect
toLayer: (CALayer aLayer 

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

Parameters:
aRectthe rectangle to convert
aLayerthe layer coordinate system to convert to
Returns:
the converted rectangle

Definition at line 899 of file CALayer.j.

- (id) delegate

Returns the layer's delegate

Definition at line 963 of file CALayer.j.

- (void) display

Displays the contents of this layer.

Definition at line 484 of file CALayer.j.

- (void) drawInContext: (CGContext)  aContext

Draws this layer's contents into the specified context.

Parameters:
aContextthe context to draw the layer into

Definition at line 532 of file CALayer.j.

- (CGRect) frame

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 356 of file CALayer.j.

- (BOOL) hidden

Returns YES if the layer is hidden.

Definition at line 583 of file CALayer.j.

- (CALayer) hitTest: (CGPoint)  aPoint

Returns the farthest descendant of this layer that contains the specified point.

Parameters:
aPointthe point to test
Returns:
the containing layer or nil if there was no hit.

Definition at line 919 of file CALayer.j.

- (id) init

Initializes the animation layer.

Definition at line 126 of file CALayer.j.

- (void) insertSublayer: (CALayer aLayer
above: (CALayer aSublayer 

Inserts a layer above another layer.

Parameters:
aLayerthe layer to insert
aSublayerthe layer to insert above
Exceptions:
CALayerNotFoundExceptionif aSublayer is not in the array of sublayers

Definition at line 740 of file CALayer.j.

- (void) insertSublayer: (CALayer aLayer
atIndex: (unsigned)  anIndex 

Inserts the specified layer as a sublayer into the specified index.

Parameters:
aLayerthe layer to insert
anIndexthe index to insert the layer at

Definition at line 684 of file CALayer.j.

- (void) insertSublayer: (CALayer aLayer
below: (CALayer aSublayer 

Inserts a layer below another layer.

Parameters:
aLayerthe layer to insert
aSublayerthe layer to insert below
Exceptions:
CALayerNotFoundExceptionif aSublayer is not in the array of sublayers

Definition at line 727 of file CALayer.j.

- (BOOL) isHidden

Returns YES if the layer is hidden.

Definition at line 591 of file CALayer.j.

+ (CALayer) layer

Returns a new animation layer.

Definition at line 118 of file CALayer.j.

- (BOOL) needsDisplayOnBoundsChange

Returns YES if the display should be redrawn on a bounds change.

Definition at line 844 of file CALayer.j.

- (float) opacity

Returns the opacity of the layer. The value is between 0.0 (transparent) and 1.0 (opaque).

Definition at line 550 of file CALayer.j.

- (CGPoint) position

Returns the layer's position

Definition at line 223 of file CALayer.j.

- (void) registerRunLoopUpdateWithMask: (unsigned)  anUpdateMask

Definition at line 802 of file CALayer.j.

- (void) removeFromSuperlayer

Removes the receiver from its superlayer.

Definition at line 665 of file CALayer.j.

- (void) replaceSublayer: (CALayer aSublayer
with: (CALayer aLayer 

Replaces a sublayer.

Parameters:
aSublayerthe layer to insert
aLayerthe layer to replace

Definition at line 754 of file CALayer.j.

+ (void) runLoopUpdateLayers

Definition at line 777 of file CALayer.j.

- (void) setAffineTransform: (CGAffineTransform)  anAffineTransform

Sets the affine transform applied to this layer.

Parameters:
anAffineTransformthe new affine transform

Definition at line 278 of file CALayer.j.

- (void) setAnchorPoint: (CGPoint)  anAnchorPoint

Sets the layer's anchor point. The default point is [0.5, 0.5].

Parameters:
anAnchorPointthe layer's new anchor point

Definition at line 246 of file CALayer.j.

- (void) setBackgroundColor: (CPColor aColor

Sets the layer's background color.

Parameters:
aColorthe new background color

Definition at line 613 of file CALayer.j.

- (void) setBackingStoreFrame: (CGRect)  aFrame

Sets the frame's backing store.

Parameters:
aFramethe new backing store.

Definition at line 381 of file CALayer.j.

- (void) setBounds: (CGRect)  aBounds

Sets the bounds (origin and size) of the rectangle.

Parameters:
aBoundsthe new bounds for the layer

Definition at line 173 of file CALayer.j.

- (void) setContents: (CGImage)  contents

Sets the image contents of this layer.

Parameters:
contentsthe image to display

Definition at line 426 of file CALayer.j.

- (void) setDelegate: (id)  aDelegate

Sets the delegate for this layer.

Parameters:
aDelegatethe delegate

Definition at line 946 of file CALayer.j.

- (void) setFrame: (CGRect)  aFrame

Sets the frame of the layer. The frame defines a bounding rectangle in the superlayer's coordinate system.

Parameters:
aFramethe new frame rectangle

Definition at line 344 of file CALayer.j.

- (void) setHidden: (BOOL)  isHidden

Sets whether the layer is hidden.

Parameters:
isHiddenYES means the layer will be hidden. NO means the layer will be visible.

Definition at line 574 of file CALayer.j.

- (void) setMasksToBounds: (BOOL)  masksToBounds

Sets whether content that goes lies outside the bounds is hidden or visible.

Parameters:
masksToBoundsYES hides the excess content. NO makes it visible.

Definition at line 600 of file CALayer.j.

- (void) setNeedsComposite

Definition at line 819 of file CALayer.j.

- (void) setNeedsDisplay

Marks the layer as needing to be redrawn.

Definition at line 827 of file CALayer.j.

- (void) setNeedsDisplayInRect: (CGRect)  aRect

Marks the specified rectangle as needing to be redrawn.

Parameters:
aRectthe area that needs to be redrawn.

Definition at line 853 of file CALayer.j.

- (void) setNeedsDisplayOnBoundsChange: (BOOL)  needsDisplayOnBoundsChange

Sets whether the layer needs to be redrawn when its bounds are changed.

Parameters:
needsDisplayOnBoundsChangeYES means the display is redraw on a bounds change.

Definition at line 836 of file CALayer.j.

- (void) setOpacity: (float)  anOpacity

Sets the opacity for the layer.

Parameters:
anOpacitythe new opacity (between 0.0 (transparent) and 1.0 (opaque)).

Definition at line 559 of file CALayer.j.

- (void) setPosition: (CGPoint)  aPosition

Sets the layer's position.

Parameters:
aPositionthe layer's new position

Definition at line 210 of file CALayer.j.

- (void) setSublayerTransform: (CGAffineTransform)  anAffineTransform

Sets the affine transform that gets applied to all the sublayers.

Parameters:
anAffineTransformthe transform to apply to sublayers

Definition at line 300 of file CALayer.j.

- (void) setZPosition: (int)  aZPosition

Sets the layer's z-ordering.

Parameters:
aZPositionthe layer's new z-ordering

Definition at line 232 of file CALayer.j.

- (CPArray) sublayers

Returns an array of the receiver's sublayers.

Definition at line 632 of file CALayer.j.

- (CGAffineTransform) sublayerTransform

Returns the affine transform applied to the sublayers.

Definition at line 325 of file CALayer.j.

- (CALayer) superlayer

Returns the receiver's superlayer.

Definition at line 640 of file CALayer.j.

- (CGAffineTransform) transformToLayer

Definition at line 334 of file CALayer.j.


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Defines