CompositionNode

sealed class CompositionNode

Describes a node in a composition

Properties

attributes
Link copied to clipboard
common
var attributes: MutableMap<String, String?>

Custom attributes to be applied to the Node in addition to the Style attributes.

bounds
Link copied to clipboard
common
abstract val bounds: Rectangle

a Rectangle that describes the bounding box of the contents

effectiveDisplay
Link copied to clipboard
common
val effectiveDisplay: Boolean
effectiveFill
Link copied to clipboard
common
val effectiveFill: ColorRGBa?
effectiveFillOpacity
Link copied to clipboard
common
val effectiveFillOpacity: Double
effectiveLineCap
Link copied to clipboard
common
val effectiveLineCap: LineCap
effectiveLineJoin
Link copied to clipboard
common
val effectiveLineJoin: LineJoin
effectiveMiterLimit
Link copied to clipboard
common
val effectiveMiterLimit: Double
effectiveOpacity
Link copied to clipboard
common
val effectiveOpacity: Double
effectiveShadeStyle
Link copied to clipboard
common
val effectiveShadeStyle: ShadeStyle
effectiveStroke
Link copied to clipboard
common
val effectiveStroke: ColorRGBa?
effectiveStrokeOpacity
Link copied to clipboard
common
val effectiveStrokeOpacity: Double
effectiveStrokeWeight
Link copied to clipboard
common
val effectiveStrokeWeight: Double
effectiveStyle
Link copied to clipboard
common
val effectiveStyle: Style

This CompositionNode's computed style. Where every style attribute is obtained by overwriting the Style in the following order:

effectiveTransform
Link copied to clipboard
common
val effectiveTransform: Matrix44

Calculates the absolute transformation of the current node.

effectiveVisibility
Link copied to clipboard
common
val effectiveVisibility: Boolean
fill
Link copied to clipboard
common
var fill: ColorRGBa?
fillOpacity
Link copied to clipboard
common
var fillOpacity: Double
id
Link copied to clipboard
common
var id: String? = null
lineCap
Link copied to clipboard
common
var lineCap: LineCap
lineJoin
Link copied to clipboard
common
var lineJoin: LineJoin
miterLimit
Link copied to clipboard
common
var miterLimit: Double
opacity
Link copied to clipboard
common
var opacity: Double
parent
Link copied to clipboard
common
var parent: CompositionNode? = null
shadeStyle
Link copied to clipboard
common
var shadeStyle: ShadeStyle
stroke
Link copied to clipboard
common
var stroke: ColorRGBa?
strokeOpacity
Link copied to clipboard
common
var strokeOpacity: Double
strokeWeight
Link copied to clipboard
common
var strokeWeight: Double
style
Link copied to clipboard
common
var style: Style

This CompositionNode's own style.

transform
Link copied to clipboard
common
var transform: Matrix44
userData
Link copied to clipboard
common
val userData: MutableMap<String, Any>

a map that stores user data

Inheritors

ImageNode
Link copied to clipboard
ShapeNode
Link copied to clipboard
TextNode
Link copied to clipboard
GroupNode
Link copied to clipboard

Extensions

filter
Link copied to clipboard
common
fun CompositionNode.filter(filter: (CompositionNode) -> Boolean): CompositionNode?
findAll
Link copied to clipboard
common
fun CompositionNode.findAll(filter: (CompositionNode) -> Boolean): List<CompositionNode>
findGroups
Link copied to clipboard
common
fun CompositionNode.findGroups(): List<GroupNode>

find all descendant GroupNode nodes, including potentially this node

findImages
Link copied to clipboard
common
fun CompositionNode.findImages(): List<ImageNode>

find all descendant ImageNode nodes, including potentially this node

findShapes
Link copied to clipboard
common
fun CompositionNode.findShapes(): List<ShapeNode>

find all descendant ShapeNode nodes, including potentially this node

findTerminals
Link copied to clipboard
common
fun CompositionNode.findTerminals(filter: (CompositionNode) -> Boolean): List<CompositionNode>
map
Link copied to clipboard
common
fun CompositionNode.map(mapper: (CompositionNode) -> CompositionNode): CompositionNode
remove
Link copied to clipboard
common
fun CompositionNode.remove()

remove node from its parent CompositionNode

visitAll
Link copied to clipboard
common
fun CompositionNode.visitAll(visitor: CompositionNode.() -> Unit)

visit this CompositionNode and all descendant nodes and execute visitor