Artboard class

Inheritance
Implementers
Available Extensions

Constructors

Artboard()

Properties

activeNestedArtboards Iterable<NestedArtboard>
no setter
animationControllers Iterable<RiveAnimationController>
Access a read-only iterator of currently applied animation controllers.
no setter
animations → AnimationList
List of animations and state machines in the artboard.
no setter
antialiasing bool
getter/setter pair
artboard Artboard
The artboard this component belongs to.
no setter
aspectRatio double
Aspect ratio value.
getter/setter pairinherited
canBeOrphaned bool
Artboard are one of the few (only?) components that can be orphaned.
no setter
childOpacity double
no setterinherited
children → ContainerChildren
finalinherited
clip bool
True when the layout component bounds clip its contents.
getter/setter pairinherited
constraintBounds AABB
Bounds to use for constraining to object space.
no setterinherited
context RuntimeArtboard
covariantgetter/setter pairinherited
coreType int
no setterinherited
coreTypes Set<int>
no setterinherited
defaultName String
no setterinherited
defaultStateMachine StateMachine?
getter/setter pair
defaultStateMachineId int
The default StateMachine attached to this artboard automatically when it is initialized.
getter/setter pairinherited
dependencies Set<Component>
no setterinherited
dependents Set<Component>
no setterinherited
dirt int
getter/setter pairinherited
drawables List<Drawable>
no setter
events → EventList
List of events in the artboard.
no setter
fills Set<Fill>
finalinherited
firstDrawable ↔ Drawable?
getter/setter pair
flexGrow double
Flex grow value.
getter/setter pairinherited
flexShrink double
Flex shrink value.
getter/setter pairinherited
frameOrigin bool
Returns true when the artboard will shift the origin from the top left to the relative width/height of the artboard itself. This is what the editor does visually when you change the origin value to give context as to where the origin lies within the framed bounds.
getter/setter pair
gapHeight double
How large should the gaps between items in a grid or flex container be?
getter/setter pairinherited
gapWidth double
How large should the gaps between items in a grid or flex container be?
getter/setter pairinherited
graphOrder int
getter/setter pairinherited
gridColumnEnd int
End position of grid item in a column.
getter/setter pairinherited
gridColumnStart int
Start position of grid item in a column.
getter/setter pairinherited
gridRowEnd int
End position of grid item in a row.
getter/setter pairinherited
gridRowStart int
Start position of grid item in a row.
getter/setter pairinherited
hasChangedDrawOrderInLastUpdate bool
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
hasValidated bool
no setterinherited
height double
Initial height of the item.
getter/setter pairinherited
id int
getter/setter pairinherited
insetBottom double
Bottom inset value.
getter/setter pairinherited
insetLeft double
Left inset value.
getter/setter pairinherited
insetRight double
Right inset value.
getter/setter pairinherited
insetTop double
Top inset value.
getter/setter pairinherited
intrinsicallySized bool
getter/setter pairinherited
isCollapsed bool
Whether this Component's update processes at all.
no setterinherited
joysticks Iterable<Joystick>
no setter
layoutFlags0 int
First BitFlags for layout styles.
getter/setter pairinherited
layoutFlags1 int
Second BitFlags for layout styles.
getter/setter pairinherited
layoutFlags2 int
Third BitFlags for layout styles.
getter/setter pairinherited
linearAnimations Iterable<LinearAnimation>
List of linear animations in the artboard.
no setter
localBounds AABB
no setterinherited
marginBottom double
Bottom margin value.
getter/setter pairinherited
marginLeft double
Left margin value.
getter/setter pairinherited
marginRight double
Right margin value.
getter/setter pairinherited
marginTop double
Top margin value.
getter/setter pairinherited
maxHeight double
Max height of the item.
getter/setter pairinherited
maxWidth double
Max width of the item.
getter/setter pairinherited
minHeight double
Min height of the item.
getter/setter pairinherited
minWidth double
Min width of the item.
getter/setter pairinherited
name String
Non-unique identifier, used to give friendly names to elements in the hierarchy. Runtimes provide an API for finding components by this name.
getter/setter pairinherited
opacity double
Change the _opacity field value. opacityChanged will be invoked only if the field's value has changed.
getter/setter pairinherited
origin Vec2D
no setter
originWorld Vec2D
no setter
originX double
Origin x in normalized coordinates (0.5 = center, 0 = left, 1 = right).
getter/setter pairinherited
originY double
Origin y in normalized coordinates (0.5 = center, 0 = top, 1 = bottom).
getter/setter pairinherited
paddingBottom double
Bottom padding value.
getter/setter pairinherited
paddingLeft double
Left padding value.
getter/setter pairinherited
paddingRight double
Right padding value.
getter/setter pairinherited
paddingTop double
Top padding value.
getter/setter pairinherited
parent ↔ ContainerComponent?
getter/setter pairinherited
parentId int
Identifier used to track parent ContainerComponent.
getter/setter pairinherited
parentWorldTransform Mat2D
Returns the world transform of the parent component. Returns the identity if there is no parent (the artboard should be the only case here).
no setterinherited
path Path
final
renderTransform Mat2D
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stateMachines Iterable<StateMachine>
List of state machines in the artboard.
no setter
strokes Set<Stroke>
finalinherited
userData ↔ dynamic
getter/setter pairinherited
width double
Initial width of the item.
getter/setter pairinherited
worldTransform Mat2D
finalinherited
worldTranslation Vec2D
no setteroverride
x double
X coordinate in editor world space.
getter/setter pairinherited
y double
Y coordinate in editor world space.
getter/setter pairinherited

Methods

addComponent(Component component) → void
Adds a component to the artboard. Good place for the artboard to check for components it'll later need to do stuff with (like draw them or sort them when the draw order changes).
addController(RiveAnimationController controller) bool
Add an animation controller to this artboard. Playing will be scheduled if it's already playing.
addDependent(Component dependent, {Component? via}) bool
Mark dependent as a component which must update after this. Provide via as the Component registering the dependency when it is not dependent itself. At edit time this allows the editor to rebuild both dependent and via when dependent has its dependencies cleared.
inherited
addDirt(int value, {bool recurse = false}) bool
inherited
addFill(Fill fill) bool
inherited
addNestedArtboard(NestedArtboard artboard) → void
addStroke(Stroke stroke) bool
inherited
advance(double elapsedSeconds, {bool nested = false}) bool
Update any dirty components in this artboard.
allDependencies(Set<Component> dependencies) → void
inherited
appendChild(Component child) → void
Adds the child to the children list and re-wires the parent reference of the child to the parent. Effectively detach and append.
inherited
applyJoysticks() bool
aspectRatioChanged(double from, double to) → void
inherited
buildDependencies() → void
inherited
buildDrawOrder(List<Drawable> drawables, DrawRules? rules, List<DrawRules> allRules) → void
inherited
canPreApplyJoysticks() bool
changeArtboard(Artboard? value) → void
inherited
childAdded(Component child) → void
inherited
childRemoved(Component child) → void
inherited
clearDependencies() → void
inherited
clipChanged(bool from, bool to) → void
clone<K extends Core<CoreContext>>() → K?
Make a duplicate of this core object, N.B. that all properties excluding object id are copied.
inherited
component<T>(String name) → T?
Find a component of a specific type with a specific name.
computeDrawOrder() → void
copy(covariant Core<CoreContext> source) → void
Copies property values, currently doesn't trigger change callbacks. It's meant to be a helper for clone.
inherited
defaultStateMachineIdChanged(int from, int to) → void
override
draw(Canvas canvas) → void
Draw the drawable components in this artboard.
flexGrowChanged(double from, double to) → void
inherited
flexShrinkChanged(double from, double to) → void
inherited
forAll(DescentCallback cb) bool
inherited
forEachChild(DescentCallback cb) → void
inherited
forEachComponent(void callback(Component)) → void
Iterate each component and call callback for it.
gapHeightChanged(double from, double to) → void
inherited
gapWidthChanged(double from, double to) → void
inherited
gridColumnEndChanged(int from, int to) → void
inherited
gridColumnStartChanged(int from, int to) → void
inherited
gridRowEndChanged(int from, int to) → void
inherited
gridRowStartChanged(int from, int to) → void
inherited
heightChanged(double from, double to) → void
import(ImportStack stack) bool
insetBottomChanged(double from, double to) → void
inherited
insetLeftChanged(double from, double to) → void
inherited
insetRightChanged(double from, double to) → void
inherited
insetTopChanged(double from, double to) → void
inherited
instance() Artboard
internalAddAnimation(Animation animation) bool
Called by rive_core to add an Animation to an Artboard. This should be @internal when it's supported.
internalAddEvent(Event event) bool
Called by rive_core to add an Event to an Artboard. This should be @internal when it's supported.
internalRemoveAnimation(Animation animation) bool
Called by rive_core to remove an Animation from an Artboard. This should be @internal when it's supported.
internalRemoveEvent(Event event) bool
Called by rive_core to remove an Event from an Artboard. This should be @internal when it's supported.
invalidateStrokeEffects() → void
Called whenever the compound path for this shape is changed so that the effects can be invalidated on all the strokes.
inherited
isValidParent(Component parent) bool
inherited
layoutFlags0Changed(int from, int to) → void
inherited
layoutFlags1Changed(int from, int to) → void
inherited
layoutFlags2Changed(int from, int to) → void
inherited
marginBottomChanged(double from, double to) → void
inherited
marginLeftChanged(double from, double to) → void
inherited
marginRightChanged(double from, double to) → void
inherited
marginTopChanged(double from, double to) → void
inherited
markDrawOrderDirty() → void
Let the artboard know that the drawables need to be resorted before drawing next.
markRebuildDependencies() → void
inherited
markWorldTransformDirty() → void
inherited
maxHeightChanged(double from, double to) → void
inherited
maxWidthChanged(double from, double to) → void
inherited
minHeightChanged(double from, double to) → void
inherited
minWidthChanged(double from, double to) → void
inherited
nameChanged(String from, String to) → void
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onAdded() → void
inherited
onAddedDirty() → void
onComponentDirty(Component component) → void
onDependencyRemoved(Component dependent) → void
Something we depend on has been removed. It's important to clear out any stored references to that dependency so it can be garbage collected (if necessary).
inherited
onDirty(int mask) → void
inherited
onFillsChanged() → void
Called when a fill is added or removed.
onPaintMutatorChanged(ShapePaintMutator mutator) → void
Called whenever a new paint mutator is added/removed from the shape paints (for example a linear gradient is added to a stroke).
onRemoved() → void
When a component has been removed from the Core Context, we clean up any dangling references left on the parent and on any other dependent component. It's important for specialization of Component to respond to override onDependencyRemoved and clean up any further stored references to that component (for example the target of a Constraint).
inherited
onStrokesChanged() → void
Called when a stroke is added or remoevd.
opacityChanged(double from, double to) → void
inherited
originXChanged(double from, double to) → void
override
originYChanged(double from, double to) → void
override
paddingBottomChanged(double from, double to) → void
inherited
paddingLeftChanged(double from, double to) → void
inherited
paddingRightChanged(double from, double to) → void
inherited
paddingTopChanged(double from, double to) → void
inherited
parentChanged(ContainerComponent? from, ContainerComponent? to) → void
inherited
parentIdChanged(int from, int to) → void
inherited
prependChild(Component child) → void
inherited
propagateCollapse(bool collapse) bool
inherited
propagateCollapseToChildren(bool collapse) → void
inherited
propagateSize() → void
inherited
remove() → void
inherited
removeComponent(Component component) → void
Remove a component from the artboard and its various tracked lists of components.
removeController(RiveAnimationController controller) bool
Remove an animation controller form this artboard.
removeFill(Fill fill) bool
inherited
removeNestedArtboard(NestedArtboard artboard) → void
removeRecursive() → void
Recursive version of Component.remove. This should only be called when you know this is the only part of the branch you are removing in your operation. If your operation could remove items from the same branch multiple times, you should consider building up a list of the individual items to remove and then remove them individually to avoid calling remove multiple times on children.
inherited
removeStroke(Stroke stroke) bool
inherited
renderTranslation(Vec2D worldTranslation) Vec2D
resolveArtboard() bool
Find the artboard in the hierarchy.
sortDependencies() → void
Sort the DAG for resolution in order of dependencies such that dependent components process after their dependencies.
sortDrawOrder() → void
toString() String
A string representation of this object.
inherited
update(int dirt) → void
updateComponents() bool
Walk the dependency tree and update components in order. Returns true if any component updated.
userDataChanged(dynamic from, dynamic to) → void
inherited
validate() bool
inherited
visitAncestor(Component ancestor) → void
Called whenever we're resolving the artboard, we piggy back on that process to visit ancestors in the tree. This is a good opportunity to check if we have an ancestor of a specific type. For example, a Path needs to know which Shape it's within.
inherited
widthChanged(double from, double to) → void
xChanged(double from, double to) → void
override
yChanged(double from, double to) → void
override

Operators

operator ==(Object other) bool
The equality operator.
inherited