Platforms to show: All Mac Windows Linux Cross-Platform

Back to CALayerMBS class.

CALayerMBS.addSublayer(layer as CALayerMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreAnimation MBS MacCG Plugin 13.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Appends the layer to the layer's list of sublayers.

If the array in the sublayers property is nil, calling this method creates an array for that property and adds the specified layer to it.

Some examples using this method:

CALayerMBS.Constructor

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreAnimation MBS MacCG Plugin 13.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Initializes the layer.

Available in OS X v10.5 and later.

CALayerMBS.display

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreAnimation MBS MacCG Plugin 13.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Reloads the content of this layer.

Do not call this method directly. The layer calls this method at appropriate times to update the layer's content. If the layer has a delegate object, this method attempts to call the delegate's Configuring the Layer's Rendering Behavior method, which the delegate can use to update the layer's contents. If the delegate does not implement the Configuring the Layer's Rendering Behavior method, this method creates a backing store and calls the layer's drawInContext: method to fill that backing store with content. The new backing store replaces the previous contents of the layer.

Subclasses can override this method and use it to set the layer's contents property directly. You might do this if your custom layer subclass handles layer updates differently.

CALayerMBS.displayIfNeeded

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreAnimation MBS MacCG Plugin 13.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Initiates the update process for a layer if it is currently marked as needing an update.

You can call this method as needed to force an update to your layer's contents outside of the normal update cycle. Doing so is generally not needed, though. The preferred way to update a layer is to call setNeedsDisplay and let the system update the layer during the next cycle.
Available in OS X v10.6 and later.

CALayerMBS.layoutIfNeeded

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreAnimation MBS MacCG Plugin 13.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Recalculate the receiver's layout, if required.

When this message is received, the layer's super layers are traversed until a ancestor layer is found that does not require layout. Then layout is performed on the entire layer-tree beneath that ancestor.

CALayerMBS.layoutSublayers

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreAnimation MBS MacCG Plugin 13.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Tells the layer to update its layout.

Subclasses can override this method and use it to implement their own layout algorithm. Your implementation must set the frame of each sublayer managed by the receiver.

The default implementation of this method calls the layoutSublayersOfLayer method of the layer's delegate object. If there is no delegate object, or the delegate does not implement that method, this method calls the layoutSublayersOfLayer method of the object in the layoutManager property.

CALayerMBS.removeAllAnimations

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreAnimation MBS MacCG Plugin 13.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Remove all animations attached to the layer.

CALayerMBS.removeFromSuperlayer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreAnimation MBS MacCG Plugin 13.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Detaches the layer from its parent layer.

You can use this method to remove a layer (and all of its sublayers) from a layer hierarchy. This method updates both the superlayer's list of sublayers and sets this layer's superlayer property to nil.
Available in OS X v10.5 and later.

CALayerMBS.renderInContext(CGContextHandle as Integer) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreAnimation MBS MacCG Plugin 16.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Renders content of CALayer into given CGContext.

Renders the receiver and its sublayers into the specified context.
This method renders directly from the layer tree, ignoring any animations added to the render tree. Renders in the coordinate space of the layer.

Returns true if plugin called render command, so layer can draw itself.
Not all layers support drawing into context.

CALayerMBS.renderInPicture(Pic as Picture) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreAnimation MBS MacCG Plugin 16.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Renders content of CALayer into given Picture.

Renders the receiver and its sublayers into the specified context.
This method renders directly from the layer tree, ignoring any animations added to the render tree. Renders in the coordinate space of the layer.

Returns true if plugin called render command, so layer can draw itself.
Not all layers support drawing into context.

CALayerMBS.setNeedsDisplay

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreAnimation MBS MacCG Plugin 13.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Marks the layer's contents as needing to be updated.

Calling this method causes the layer to recache its content. This results in the layer potentially calling either the displayLayer or drawLayer:inContext method of its delegate. The existing content in the layer's contents property is removed to make way for the new content.

Available in OS X v10.5 and later.

CALayerMBS.setNeedsDisplayInRect(r as CGRectMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreAnimation MBS MacCG Plugin 13.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Marks the region within the specified rectangle as needing to be updated.

r: The rectangular region of the layer to mark as invalid. You must specify this rectangle in the layer's own coordinate system.
Available in OS X v10.5 and later.

CALayerMBS.setNeedsLayout

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreAnimation MBS MacCG Plugin 13.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Invalidates the layer's layout and marks it as needing an update.

You can call this method to indicate that the layout of a layer's sublayers has changed and must be updated. The system typically calls this method automatically when the layer's bounds change or when sublayers are added or removed. In OS X, if your layer's layoutManager property contains an object that implements the invalidateLayoutOfLayer method, that method is called too.

During the next update cycle, the system calls the layoutSublayers method of any layers requiring layout updates.
Available in OS X v10.5 and later.

CALayerMBS.sublayers as CALayerMBS()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreAnimation MBS MacCG Plugin 14.0 ✅ Yes ❌ No ❌ No ✅ Yes All
The array with sublayers.

The items on this page are in the following plugins: MBS MacCG Plugin.


The biggest plugin in space...