Platforms to show: All Mac Windows Linux Cross-Platform

Back to CALayerMBS class.

Previous items

CALayerMBS.position as CGRectMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreAnimation MBS MacCG Plugin 13.1 ✅ Yes ❌ No ❌ No ✅ Yes All
The layer's position in its superlayer's coordinate space. Animatable.

The value of this property is specified in points and is always specified relative to the value in the anchorPoint property. For new standalone layers, the default position is set to (0.0, 0.0). Changing the frame property also updates the value in this property.

For more information about the relationship between the frame, bounds, anchorPoint and position properties, see Core Animation Programming Guide.
(Read and Write property)

CALayerMBS.preferredFrameSize as CGSizeMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreAnimation MBS MacCG Plugin 13.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the preferred size of the layer in the coordinate space of its superlayer.

In OS X, the default implementation of this method calls the preferredSizeOfLayer method of its layout manager—that is, the object in its layoutManager property. If that object does not exist or does not implement that method, this method returns the size of the layer's current bounds rectangle mapped into the coordinate space of its superlayer.
(Read only property)

CALayerMBS.presentationLayer as CALayerMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreAnimation MBS MacCG Plugin 13.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns a copy of the presentation layer object that represents the state of the layer as it currently appears onscreen.

The layer object returned by this method provides a close approximation of the layer that is currently being displayed onscreen. While an animation is in progress, you can retrieve this object and use it to get the current values for those animations.

The sublayers, mask, and superlayer properties of the returned layer return the corresponding objects from the presentation tree (not the model tree). This pattern also applies to any read-only layer methods. For example, the hitTest: method of the returned object queries the layer objects in the presentation tree.

Available in OS X v10.5 and later.
(Read only property)

CALayerMBS.rasterizationScale as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreAnimation MBS MacCG Plugin 15.3 ✅ Yes ❌ No ❌ No ✅ Yes All
The scale at which the layer will be rasterized.

(when the shouldRasterize property has been set to true) relative to the coordinate space of the layer. Defaults to one. Animatable.
(Read and Write property)

CALayerMBS.shadowColor as Variant

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreAnimation MBS MacCG Plugin 15.0 ✅ Yes ❌ No ❌ No ✅ Yes All
The color of the layer’s shadow. Animatable.

The default value of this property is an opaque black color.

The value of this property is retained using the Core Foundation retain/release semantics. This behavior occurs despite the fact that the property declaration appears to use the default assign semantics for object retention.

Value is a CGColorMBS object.
(Read and Write property)

CALayerMBS.shadowOffset as CGSizeMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreAnimation MBS MacCG Plugin 15.0 ✅ Yes ❌ No ❌ No ✅ Yes All
The offset (in points) of the layer’s shadow. Animatable.

The default value of this property is (0.0, -3.0).
(Read and Write property)

CALayerMBS.shadowOpacity as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreAnimation MBS MacCG Plugin 13.1 ✅ Yes ❌ No ❌ No ✅ Yes All
The opacity of the layer's shadow. Animatable.

The value in this property must be in the range 0.0 (transparent) to 1.0 (opaque). The default value of this property is 0.0.
Available in OS X v10.5 and later.
(Read and Write property)

CALayerMBS.shadowPath as Variant

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreAnimation MBS MacCG Plugin 15.0 ✅ Yes ❌ No ❌ No ✅ Yes All
The shadow path.

Value is a CGPathMBS object.

The default value of this property is nil, which causes the layer to use a standard shadow shape. If you specify a value for this property, the layer creates its shadow using the specified path instead of the layer’s composited alpha channel. The path you provide defines the outline of the shadow. It is filled using the non-zero winding rule and the current shadow color, opacity, and blur radius.

Unlike most animatable properties, this property (as with all CGPathRef animatable properties) does not support implicit animation. However, the path object may be animated using any of the concrete subclasses of CAPropertyAnimation. Paths will interpolate as a linear blend of the "on-line" points; "off-line" points may be interpolated non-linearly (to preserve continuity of the curve's derivative). If the two paths have a different number of control points or segments, the results are undefined. If the path extends outside the layer bounds it will not automatically be clipped to the layer, only if the normal layer masking rules cause that.

Specifying an explicit path usually improves rendering performance.

The value of this property is retained using the Core Foundation retain/release semantics. This behavior occurs despite the fact that the property declaration appears to use the default assign semantics for object retention.
(Read and Write property)

CALayerMBS.shadowRadius as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreAnimation MBS MacCG Plugin 15.0 ✅ Yes ❌ No ❌ No ✅ Yes All
The blur radius (in points) used to render the layer’s shadow. Animatable.

You specify the radius The default value of this property is 3.0.
(Read and Write property)

CALayerMBS.shouldRasterize as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreAnimation MBS MacCG Plugin 15.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Whether view should raster.

When true, the layer is rendered as a bitmap in its local coordinate space ("rasterized"), then the bitmap is composited into the destination (with the minificationFilter and magnificationFilter properties of the layer applied if the bitmap needs scaling). Rasterization occurs after the layer's filters and shadow effects are applied, but before the opacity modulation. As an implementation detail the rendering engine may attempt to cache and reuse the bitmap from one frame to the next. (Whether it does or not will have no affect on the rendered output.) When false the layer is composited directly into the destination whenever possible (however, certain features of the compositing model may force rasterization, e.g. adding filters). Defaults to false. Animatable.
(Read and Write property)

Some examples using this property:

CALayerMBS.superlayer as CALayerMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreAnimation MBS MacCG Plugin 13.1 ✅ Yes ❌ No ❌ No ✅ Yes All
The superlayer of the layer.

The superlayer manages the layout of its sublayers.
Available in OS X v10.5 and later.
(Read only property)

CALayerMBS.zPosition as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreAnimation MBS MacCG Plugin 13.1 ✅ Yes ❌ No ❌ No ✅ Yes All
The layer's position on the z axis. Animatable.

The default value of this property is 0. Changing the value of this property changes the the front-to-back ordering of layers onscreen. This can affect the visibility of layers whose frame rectangles overlap.

The value of this property is measured in points.
Available in OS X v10.5 and later.
(Read and Write property)

Some examples using this property:

Previous items

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


💬 Ask a question or report a problem
The biggest plugin in space...