Container
Container
is the top level of the layer hierarchy. You will never need to create a Container on your own, however you may wish to manipulate its properties, especially the sublayer geometry properties.
Topics
Discussion
Properties
Refer to the properties concepts section for an overview of properties.
|
Set the value of multiple properties by name. |
|
Set property |
|
Create a context manager that allows setting multiple properties in an efficient way. |
Identification
|
Get the name assigned to this layer during |
|
Set |
|
Set |
Transformations
- Container.getContainerTransformation()
Get the transformation that applies to all sublayers in the container.
- Container.setContainerTransformation(transformation)
Set the transformation that applies to all sublayers in the container.
container.appendBaseSublayer( position=(50, 50), size=(400, 100), backgroundColor=(1, 0, 0, 1) ) container.setContainerTransformation((0.5, 0, 0, 0.5, 100, 100))
- Container.getContainerScale()
Get the scale that applies to all sublayers.
- Container.setContainerScale(scale)
Set the scale that applies to all sublayers.
container.appendBaseSublayer( position=(50, 50), size=(400, 100), backgroundColor=(1, 0, 0, 1) ) container.setSublayerScale(0.5)
|
Add a transformation with |
Remove the transformation with |
|
Add a sublayer translate transformation with |
|
|
Add a sublayer scale transformation with |
|
Add a sublayer scale transformation with |
|
Add a sublayer skew transformation with |
Frame
Get if the layer is visible. |
|
|
Set if the layer is visible. |
Get if the layer hides any sublayer data outside of its frame. |
|
|
set if the layer hides any sublayer data outside of its frame. |
Get the opacity of this layer. |
|
|
Set the opacity of this layer, |
Get the background color for this layer. |
|
|
Set the background color for this layer. |
Get the border color for this layer. |
|
|
Set the border color for this layer. |
Get the border width for this layer. |
|
|
Set the border width for this layer. |
Get this corner radius of this layer. |
|
|
Set the corner radius of this layer. |
Shadow
Get the shadow color for this layer. |
|
|
Set the shadow color for this layer. |
Get the shadow opacity for this layer. |
|
|
Set the shadow opacity for this layer. |
Get the shadow offset for this layer. |
|
|
Set the shadow offset for this layer. |
Get the shadow blur radius for this layer. |
|
|
Set the shadow blur radius for this layer. |
Filters
Refer the filter documentation in Base for complete details.
Set the compositing filter for the layer. |
|
|
Set the compositing filter for the layer. |
Get a list of the filters for this layer. |
|
|
Set a list of the filters for this layer. |
|
Append a filter to this layer. |
|
Get the filter with |
|
Remove the filter with |
Clear all background filters from this layer. |
|
Get a list of the background filters for this layer. |
|
|
Set a list of the background filters for this layer. |
|
Append a background filter to this layer. |
|
Get the background filter with |
|
Remove the background filter with |
Animation
Refer to the animation concepts section for an overview of animation.
Remove all animations from this layer. |
|
|
Stop the animation with the |
Get if animation is currently paused for this layer. |
|
Pause the animation of this layer. |
|
Resume the animation of the layer. |
Sublayers
Refer to the layer hierarchy concepts section for an overview of sublayers.
|
Place a hold on adding the sublayers to this layer’s CALayer until the context manager exits. |
Get all sublayers within this layer. |
|
|
Get the sublayer with |
Remove all sublayers within this layer. |
|
|
Remove the given sublayer from the layer. |
|
Append an instantiated sublayer to this layer. |
|
Append a sublayer to this layer. |
|
Append a base layer. |
|
Append a path layer. |
|
Append a line layer. |
|
Append a oval layer. |
|
Append a rectangle layer. |
|
Append an image layer. |
|
Append a text box. |
|
Append a text line. |
|
Append a symbol. |
|
This creates a context manager that provides a sublayer creation syntax that supports a subset of the DrawBot API. |
Superlayers
Refer to the layer hierarchy concepts section for an overview of superlayers.
Get the Container that this layer belongs to. |
|
Get the layer that this layer belongs to. |
Hit Testing
CoreAnimation Object
Get the CALayer that this object wraps. |