Artboard class
- Inheritance
-
- Object
- ArtboardBase
- Artboard
- Available extensions
Constructors
- Artboard()
Properties
-
activeNestedArtboards
→ Iterable<
NestedArtboard> -
no setter
- animates → bool
-
no setterinherited
-
animationControllers
→ Iterable<
RiveAnimationController> -
Access a read-only iterator of currently applied animation controllers.
no setter
- animationData ↔ LayoutAnimationData
-
getter/setter pairinherited
- animations → AnimationList
-
List of animations and state machines in the artboard.
no setter
- animationStyle → LayoutAnimationStyle
-
no setterinherited
- antialiasing ↔ bool
-
getter/setter pair
- artboard → Artboard
-
The artboard this component belongs to.
no setter
- 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
-
dataBinds
→ Iterable<
DataBind> -
no setter
- dataContext ↔ DataContext?
-
getter/setter pair
- 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
- dependencyRoot ↔ Artboard?
-
getter/setter pairinherited
-
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
- 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
-
globalDataBinds
→ List<
DataBind> -
final
- graphOrder ↔ int
-
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
- interpolation → LayoutStyleInterpolation
-
no setterinherited
- interpolationTime → double
-
no setterinherited
- interpolator → KeyFrameInterpolator?
-
no setterinherited
- isCollapsed → bool
-
Whether this Component's update processes at all.
no setterinherited
- isPlaying → bool
-
no setter
-
joysticks
→ Iterable<
Joystick> -
no setter
- layoutBounds → AABB
-
no setter
- layoutNode → LayoutNode
-
no setterinherited
- layoutStyle → LayoutStyle
-
no setterinherited
-
linearAnimations
→ Iterable<
LinearAnimation> -
List of linear animations in the artboard.
no setter
- localBounds → AABB
-
no setterinherited
- 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
- 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
- style ↔ LayoutComponentStyle?
-
getter/setter pairinherited
- styleId ↔ int
-
LayoutStyle that defines the styling for this LayoutComponent
getter/setter pairinherited
- userData ↔ dynamic
-
getter/setter pairinherited
- viewModelId ↔ int
-
The view model attached to this artboard data context.
getter/setter pairinherited
- viewModelInstance ↔ ViewModelInstance?
-
getter/setter pair
- width ↔ double
-
Initial width of the item.
getter/setter pairinherited
- worldBounds → AABB
-
no setterinherited
- worldTransform → Mat2D
-
finalinherited
- worldTranslation → Vec2D
-
no setter
- 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. Providevia
as the Component registering the dependency when it is notdependent
itself. At edit time this allows the editor to rebuild bothdependent
andvia
whendependent
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 -
advanceInternal(
double elapsedSeconds, {bool nested = false, bool isRoot = false}) → bool - Update any dirty components in this artboard.
-
allDependencies(
Set< Component> dependencies) → void -
inherited
-
animationByName(
String name) → LinearAnimationInstance? -
Available on Artboard, provided by the ArtboardAdditions extension
Returns an animation with the given name, or null if no animation with that name exists in the artboard -
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 isRoot = false}) → bool -
buildDependencies(
) → void -
inherited
-
buildDrawOrder(
List< Drawable> drawables, DrawRules? rules, List<DrawRules> allRules) → void -
inherited
-
canPreApplyJoysticks(
) → bool -
cascadeAnimationStyle(
LayoutStyleInterpolation inheritedInterpolation, KeyFrameInterpolator? inheritedInterpolator, double inheritedInterpolationTime) → void -
inherited
-
changeArtboard(
Artboard? value) → void -
inherited
-
childAdded(
Component child) → void -
inherited
-
childRemoved(
Component child) → void -
inherited
-
clearDependencies(
) → void -
inherited
-
clearInheritedInterpolation(
) → 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.
-
computeBindings(
bool isRoot) → void -
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.
-
findSMI<
T> (String name, String path) → T? -
Available on Artboard, provided by the ArtboardRuntimeExtensions extension
-
forAll(
DescentCallback cb) → bool -
inherited
-
forEachChild(
DescentCallback cb) → void -
inherited
-
forEachComponent(
void callback(Component)) → void - Iterate each component and call callback for it.
-
getBoolInput(
String name, String path) → SMIBool? -
Available on Artboard, provided by the ArtboardRuntimeExtensions extension
Find a boolean input with a given name on a nested artboard at path. -
getComponentWhereOrNull<
T> (bool callback(Component)) → T? - Find a component that matches the given predicate.
-
getNumberInput(
String name, String path) → SMINumber? -
Available on Artboard, provided by the ArtboardRuntimeExtensions extension
Find a number input with a given name on a nested artboard at path. -
getTriggerInput(
String name, String path) → SMITrigger? -
Available on Artboard, provided by the ArtboardRuntimeExtensions extension
Find a trigger input with a given name on a nested artboard at path. -
hasLayoutMeasurements(
) → bool -
inherited
-
heightChanged(
double from, double to) → void -
import(
ImportStack stack) → bool -
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.
-
internalDataContext(
DataContext dataContextValue, DataContext? parentDataContext, bool isRoot) → void -
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
-
markDrawOrderDirty(
) → void - Let the artboard know that the drawables need to be resorted before drawing next.
-
markLayoutDirty(
LayoutComponent layoutComponent) → void -
markLayoutNodeDirty(
) → void -
inherited
-
markLayoutStyleDirty(
) → void -
inherited
-
markRebuildDependencies(
) → void -
inherited
-
markWorldTransformDirty(
) → void -
inherited
-
nameChanged(
String from, String to) → void -
inherited
-
nestedArtboard(
String name) → NestedArtboard? -
Available on Artboard, provided by the ArtboardRuntimeExtensions extension
-
nestedArtboardAtPath(
String path) → NestedArtboard? -
Available on Artboard, provided by the ArtboardRuntimeExtensions extension
-
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
-
paintChanged(
) → void -
inherited
-
parentChanged(
ContainerComponent? from, ContainerComponent? to) → void -
inherited
-
parentIdChanged(
int from, int to) → void -
inherited
-
pause(
) → void -
play(
) → void -
populateDataBinds(
List< DataBind> globalDataBinds) → void -
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.
-
setDataContextFromInstance(
ViewModelInstance viewModelInstance, DataContext? parent, bool isRoot) → void -
setInheritedInterpolation(
LayoutStyleInterpolation interpolation, KeyFrameInterpolator? interpolator, double interpolationTime) → void -
inherited
-
setupStyle(
LayoutComponentStyle style) → void -
inherited
-
sortDataBinds(
) → void -
sortDependencies(
) → void - Sort the DAG for resolution in order of dependencies such that dependent components process after their dependencies.
-
sortDrawOrder(
) → void -
stateMachineByName(
String name, {OnStateChange? onChange}) → StateMachineController? -
Available on Artboard, provided by the ArtboardAdditions extension
Returns a StateMachine with the given name, or null if no state machine with that name exists in the artboard -
styleIdChanged(
int from, int to) → void -
inherited
-
styleInterpolationChanged(
) → void -
inherited
-
styleValueChanged(
) → void -
inherited
-
syncLayoutChildren(
) → void -
inherited
-
syncStyle(
) → void -
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
triggerInput(
String name, String path) → void -
Available on Artboard, provided by the ArtboardRuntimeExtensions extension
Convenience method for firing a trigger input with a given name on a nested artboard at path. -
update(
int dirt) → void -
updateComponents(
) → bool - Walk the dependency tree and update components in order. Returns true if any component updated.
-
updateDataBinds(
) → void -
updateLayoutBounds(
) → void -
inherited
-
userDataChanged(
dynamic from, dynamic to) → void -
inherited
-
validate(
) → bool -
inherited
-
viewModelIdChanged(
int from, int to) → void -
override
-
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