API  0.9.6
 All Classes Files Functions Variables Macros Modules 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
 
- Instance Methods inherited from CPObject
(void) - addObserver:forKeyPath:options:context:
 
(void) - applyChange:toKeyPath:
 
(id) - autorelease
 
(id) - awakeAfterUsingCoder:
 
(void) - awakeFromCib
 
(void) - bind:toObject:withKeyPath:options:
 
(Class) - classForCoder
 
(Class) - classForKeyedArchiver
 
(CPString- className
 
(id) - copy
 
(void) - dealloc
 
(CPString- description
 
(CPDictionary- dictionaryWithValuesForKeys:
 
(void) - didChange:valuesAtIndexes:forKey:
 
(void) - didChangeValueForKey:
 
(void) - didChangeValueForKey:withSetMutation:usingObjects:
 
(void) - doesNotRecognizeSelector:
 
(CPArray- exposedBindings
 
(id) - forwardingTargetForSelector:
 
(void) - forwardInvocation:
 
(unsigned) - hash
 
(BOOL) - implementsSelector:
 
(CPDictionary- infoForBinding:
 
(BOOL) - isEqual:
 
(BOOL) - isKindOfClass:
 
(BOOL) - isMemberOfClass:
 
(BOOL) - isProxy
 
(IMP) - methodForSelector:
 
(CPMethodSignature) - methodSignatureForSelector:
 
(id) - mutableArrayValueForKey:
 
(id) - mutableArrayValueForKeyPath:
 
(id) - mutableCopy
 
(id) - mutableSetValueForKey:
 
(id) - mutableSetValueForKeyPath:
 
(id) - performSelector:
 
(id) - performSelector:withObject:
 
(id) - performSelector:withObject:withObject:
 
(id) - performSelector:withObjects:
 
(void) - release
 
(void) - removeObserver:forKeyPath:
 
(id) - replacementObjectForArchiver:
 
(id) - replacementObjectForCoder:
 
(id) - replacementObjectForKeyedArchiver:
 
(BOOL) - respondsToSelector:
 
(id) - retain
 
(id) - self
 
(void) - setValue:forKey:
 
(void) - setValue:forKeyPath:
 
(void) - setValue:forUndefinedKey:
 
(void) - setValuesForKeysWithDictionary:
 
(CPString- UID
 
(void) - unbind:
 
(Class) - valueClassForBinding:
 
(id) - valueForKey:
 
(id) - valueForKeyPath:
 
(id) - valueForUndefinedKey:
 
(void) - willChange:valuesAtIndexes:forKey:
 
(void) - willChangeValueForKey:
 
(void) - willChangeValueForKey:withSetMutation:usingObjects:
 

Class Methods

(CALayer+ layer
 
(void) + runLoopUpdateLayers
 
- Class Methods inherited from CPObject
(BOOL) + accessInstanceVariablesDirectly
 
(id) + alloc
 
(id) + allocWithCoder:
 
(BOOL) + automaticallyNotifiesObserversForKey:
 
(Class) + class
 
(void) + exposeBinding:
 
(void) + initialize
 
(IMP) + instanceMethodForSelector:
 
(BOOL) + instancesRespondToSelector:
 
(BOOL) + isSubclassOfClass:
 
(CPSet+ keyPathsForValuesAffectingValueForKey:
 
(void) + load
 
(id) + new
 
(void) + setVersion:
 
(Class) + superclass
 
(int) + version
 

Additional Inherited Members

- Instance Variables inherited from CPObject
Class isa
 

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

- (CGAffineTransform) affineTransform
implementation

Returns the layer's affine transform.

Definition at line 291 of file CALayer.j.

- (CGPoint) anchorPoint
implementation

Returns the layer's anchor point.

Definition at line 269 of file CALayer.j.

- (CPColor) backgroundColor
implementation

Returns the layer's background color.

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

- (CGRect) bounds
implementation

Returns the layer's bound.

Definition at line 201 of file CALayer.j.

- (void) composite
implementation

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

- (CGImage) contents
implementation

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 
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 866 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 877 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 888 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 899 of file CALayer.j.

- (id) delegate
implementation

Returns the layer's delegate

Definition at line 963 of file CALayer.j.

- (void) display
implementation

Displays the contents of this layer.

Definition at line 484 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 532 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 356 of file CALayer.j.

- (BOOL) hidden
implementation

Returns YES if the layer is hidden.

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

- (id) init
implementation

Initializes the animation layer.

Reimplemented from CPObject.

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

- (void) insertSublayer: (CALayer aLayer
atIndex: (unsigned)  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 684 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 727 of file CALayer.j.

- (BOOL) isHidden
implementation

Returns YES if the layer is hidden.

Definition at line 591 of file CALayer.j.

+ (CALayer) layer
implementation

Returns a new animation layer.

Definition at line 118 of file CALayer.j.

- (BOOL) needsDisplayOnBoundsChange
implementation

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

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

- (CGPoint) position
implementation

Returns the layer's position

Definition at line 223 of file CALayer.j.

- (void) registerRunLoopUpdateWithMask: (unsigned)  anUpdateMask
implementation

Definition at line 802 of file CALayer.j.

- (void) removeFromSuperlayer
implementation

Removes the receiver from its superlayer.

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

+ (void) runLoopUpdateLayers
implementation

Definition at line 777 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 278 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 246 of file CALayer.j.

- (void) setBackgroundColor: (CPColor aColor
implementation

Sets the layer's background color.

Parameters
aColorthe new background color

Definition at line 613 of file CALayer.j.

- (void) setBackingStoreFrame: (CGRect)  aFrame
implementation

Sets the frame's backing store.

Parameters
aFramethe new backing store.

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

- (void) setContents: (CGImage)  contents
implementation

Sets the image contents of this layer.

Parameters
contentsthe image to display

Definition at line 426 of file CALayer.j.

- (void) setDelegate: (id)  aDelegate
implementation

Sets the delegate for this layer.

Parameters
aDelegatethe delegate

Definition at line 946 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 344 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 574 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 600 of file CALayer.j.

- (void) setNeedsComposite
implementation

Definition at line 819 of file CALayer.j.

- (void) setNeedsDisplay
implementation

Marks the layer as needing to be redrawn.

Definition at line 827 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 853 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 836 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 559 of file CALayer.j.

- (void) setPosition: (CGPoint)  aPosition
implementation

Sets the layer's position.

Parameters
aPositionthe layer's new position

Definition at line 210 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 300 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 232 of file CALayer.j.

- (CPArray) sublayers
implementation

Returns an array of the receiver's sublayers.

Definition at line 632 of file CALayer.j.

- (CGAffineTransform) sublayerTransform
implementation

Returns the affine transform applied to the sublayers.

Definition at line 325 of file CALayer.j.

- (CALayer) superlayer
implementation

Returns the receiver's superlayer.

Definition at line 640 of file CALayer.j.

- (CGAffineTransform) transformToLayer
implementation

Definition at line 334 of file CALayer.j.


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