API  0.9.7
 All Classes Files Functions Variables Macros Groups Pages
CALayer Class Reference

#import <CALayer.h>

+ Inheritance diagram for CALayer:

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
implementation

Adds the specified layer as a sublayer of the receiver.

Definition at line 658 of file CALayer.j.

- (CGAffineTransform) affineTransform
implementation

Returns the layer's affine transform.

Definition at line 295 of file CALayer.j.

- (CGPoint) anchorPoint
implementation

Returns the layer's anchor point.

Definition at line 273 of file CALayer.j.

- (CPColor) backgroundColor
implementation

Returns the layer's background color.

Definition at line 629 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 376 of file CALayer.j.

- (CGRect) bounds
implementation

Returns the layer's bound.

Definition at line 205 of file CALayer.j.

- (void) composite
implementation

Definition at line 444 of file CALayer.j.

- (BOOL) containsPoint: (CGPoint)  aPoint
implementation

Returns YES if the layer contains the point.

Parameters
aPointthe point to test

Definition at line 913 of file CALayer.j.

- (CGImage) contents
implementation

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

Definition at line 421 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
aPointthe point to convert
aLayerthe layer coordinate system to convert from
Returns
the converted point

Definition at line 870 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
aPointthe point to convert
aLayerthe layer coordinate system to convert to
Returns
the converted point

Definition at line 881 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
aRectthe rectangle to convert
aLayerthe layer coordinate system to convert from
Returns
the converted rectangle

Definition at line 892 of file CALayer.j.

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

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

- (id) delegate
implementation

Returns the layer's delegate

Definition at line 966 of file CALayer.j.

- (void) display
implementation

Displays the contents of this layer.

Definition at line 490 of file CALayer.j.

- (void) drawInContext: (CGContext)  aContext
implementation

Draws this layer's contents into the specified context.

Parameters
aContextthe context to draw the layer into

Definition at line 538 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 360 of file CALayer.j.

- (BOOL) hidden
implementation

Returns YES if the layer is hidden.

Definition at line 589 of file CALayer.j.

- (CALayer) hitTest: (CGPoint)  aPoint
implementation

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

- (id) init
implementation

Initializes the animation layer.

Definition at line 128 of file CALayer.j.

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

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

- (void) insertSublayer: (CALayer aLayer
atIndex: (CPUInteger)  anIndex 
implementation

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

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

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

- (BOOL) isHidden
implementation

Returns YES if the layer is hidden.

Definition at line 597 of file CALayer.j.

+ (CALayer) layer
implementation

Returns a new animation layer.

Definition at line 120 of file CALayer.j.

- (BOOL) needsDisplayOnBoundsChange
implementation

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

Definition at line 848 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 556 of file CALayer.j.

- (CGPoint) position
implementation

Returns the layer's position

Definition at line 227 of file CALayer.j.

- (void) registerRunLoopUpdateWithMask: (unsigned)  anUpdateMask
implementation

Definition at line 806 of file CALayer.j.

- (void) removeFromSuperlayer
implementation

Removes the receiver from its superlayer.

Definition at line 666 of file CALayer.j.

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

Replaces a sublayer.

Parameters
aSublayerthe layer to insert
aLayerthe layer to replace

Definition at line 758 of file CALayer.j.

+ (void) runLoopUpdateLayers
implementation

Definition at line 780 of file CALayer.j.

- (void) setAffineTransform: (CGAffineTransform)  anAffineTransform
implementation

Sets the affine transform applied to this layer.

Parameters
anAffineTransformthe new affine transform

Definition at line 282 of file CALayer.j.

- (void) setAnchorPoint: (CGPoint)  anAnchorPoint
implementation

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

Parameters
anAnchorPointthe layer's new anchor point

Definition at line 250 of file CALayer.j.

- (void) setBackgroundColor: (CPColor aColor
implementation

Sets the layer's background color.

Parameters
aColorthe new background color

Definition at line 619 of file CALayer.j.

- (void) setBackingStoreFrame: (CGRect)  aFrame
implementation

Sets the frame's backing store.

Parameters
aFramethe new backing store.

Definition at line 385 of file CALayer.j.

- (void) setBounds: (CGRect)  aBounds
implementation

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

Parameters
aBoundsthe new bounds for the layer

Definition at line 177 of file CALayer.j.

- (void) setContents: (CGImage)  contents
implementation

Sets the image contents of this layer.

Parameters
contentsthe image to display

Definition at line 430 of file CALayer.j.

- (void) setDelegate: (id)  aDelegate
implementation

Sets the delegate for this layer.

Parameters
aDelegatethe delegate

Definition at line 949 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
aFramethe new frame rectangle

Definition at line 348 of file CALayer.j.

- (void) setHidden: (BOOL)  isHidden
implementation

Sets whether the layer is hidden.

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

Definition at line 580 of file CALayer.j.

- (void) setMasksToBounds: (BOOL)  masksToBounds
implementation

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

- (void) setNeedsComposite
implementation

Definition at line 823 of file CALayer.j.

- (void) setNeedsDisplay
implementation

Marks the layer as needing to be redrawn.

Definition at line 831 of file CALayer.j.

- (void) setNeedsDisplayInRect: (CGRect)  aRect
implementation

Marks the specified rectangle as needing to be redrawn.

Parameters
aRectthe area that needs to be redrawn.

Definition at line 857 of file CALayer.j.

- (void) setNeedsDisplayOnBoundsChange: (BOOL)  needsDisplayOnBoundsChange
implementation

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

- (void) setOpacity: (float)  anOpacity
implementation

Sets the opacity for the layer.

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

Definition at line 565 of file CALayer.j.

- (void) setPosition: (CGPoint)  aPosition
implementation

Sets the layer's position.

Parameters
aPositionthe layer's new position

Definition at line 214 of file CALayer.j.

- (void) setSublayerTransform: (CGAffineTransform)  anAffineTransform
implementation

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

Parameters
anAffineTransformthe transform to apply to sublayers

Definition at line 304 of file CALayer.j.

- (void) setZPosition: (int)  aZPosition
implementation

Sets the layer's z-ordering.

Parameters
aZPositionthe layer's new z-ordering

Definition at line 236 of file CALayer.j.

- (CPArray) sublayers
implementation

Returns an array of the receiver's sublayers.

Definition at line 638 of file CALayer.j.

- (CGAffineTransform) sublayerTransform
implementation

Returns the affine transform applied to the sublayers.

Definition at line 329 of file CALayer.j.

- (CALayer) superlayer
implementation

Returns the receiver's superlayer.

Definition at line 646 of file CALayer.j.

- (CGAffineTransform) transformToLayer
implementation

Definition at line 338 of file CALayer.j.


The documentation for this class was generated from the following files: