Shape class Null safety

Inheritance

Constructors

Shape()

Properties

artboard Artboard?
The artboard this component belongs to.
read-only, inherited
blendMode BlendMode
read / write, inherited
blendModeValue int
Change the _blendModeValue field value. blendModeValueChanged will be invoked only if the field's value has changed.
read / write, inherited
canBeOrphaned bool
Override to true if you want some object inheriting from Component to not have a parent. Most objects will validate that they have a parent during the onAdded callback otherwise they are considered invalid and are culled from core.
read-only, inherited
childOpacity double
read-only, inherited
children → ContainerChildren
final, inherited
clippingShapes Iterable<ClippingShape>
read-only, inherited
context RuntimeArtboard
covariant, read / write, inherited
coreType int
read-only, inherited
coreTypes Set<int>
read-only, inherited
dependents Set<Component>
read-only, inherited
dirt int
read / write, inherited
drawableFlags int
Change the _drawableFlags field value. drawableFlagsChanged will be invoked only if the field's value has changed.
read / write, inherited
drawRules → DrawRules?
read-only, inherited
fillInWorld bool
read-only
fillPath Path
read-only
fills Set<Fill>
final, inherited
flattenedDrawRules ↔ DrawRules?
Flattened rules inherited from parents (or self) so we don't have to look up the tree when re-sorting.
read / write, inherited
graphOrder int
read / write, inherited
hashCode int
The hash code for this object. [...]
read-only, inherited
hasValidated bool
read-only, inherited
id int
read / write, inherited
isHidden bool
read-only, inherited
localBounds → AABB
read-only, inherited
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.
read / write, inherited
next ↔ Drawable?
The next drawable in the draw order.
read / write, inherited
opacity double
Change the _opacity field value. opacityChanged will be invoked only if the field's value has changed.
read / write, inherited
parent ↔ ContainerComponent?
read / write, inherited
parentId int
Identifier used to track parent ContainerComponent.
read / write, inherited
pathComposer ↔ PathComposer
read / write
paths Set<Path>
final
prev ↔ Drawable?
The previous drawable in the draw order.
read / write, inherited
renderOpacity double
read-only, inherited
rotation double
Change the _rotation field value. rotationChanged will be invoked only if the field's value has changed.
read / write, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
scale ↔ Vec2D
read / write, inherited
scaleX double
Change the _scaleX field value. scaleXChanged will be invoked only if the field's value has changed.
read / write, inherited
scaleY double
Change the _scaleY field value. scaleYChanged will be invoked only if the field's value has changed.
read / write, inherited
strokes Set<Stroke>
final, inherited
transform → Mat2D
final, inherited
translation ↔ Vec2D
Sets the position of the Node
read / write, inherited
userData ↔ dynamic
read / write, inherited
wantLocalPath bool
read-only
wantWorldPath bool
read-only
worldTransform → Mat2D
final, inherited
worldTranslation → Vec2D
read-only, inherited
x double
Change the _x field value. xChanged will be invoked only if the field's value has changed.
read / write, inherited
y double
Change the _y field value. yChanged will be invoked only if the field's value has changed.
read / write, inherited

Methods

addDependent(Component dependent) bool
inherited
addDirt(int value, {bool recurse = false}) bool
inherited
addFill(Fill fill) bool
inherited
addPath(Path path) bool
addStroke(Stroke stroke) bool
appendChild(Component child) → void
inherited
blendModeValueChanged(int from, int to) → void
buildDependencies() → void
Since the PathComposer isn't in core, we need to let it know when to proxy build dependencies.
buildDrawOrder(List<Drawable> drawables, DrawRules? rules, List<DrawRules> allRules) → void
inherited
calculateWorldTransform() → void
inherited
childAdded(Component child) → void
inherited
childRemoved(Component child) → void
inherited
clip(Canvas canvas) bool
inherited
clone<K extends Core<CoreContext>>() → K?
Make a duplicate of this core object, N.B. that all properties including id's are copied.
inherited
copy(covariant DrawableBase source) → void
Copies property values, currently doesn't trigger change callbacks. It's meant to be a helper for clone.
inherited
draw(Canvas canvas) → void
Draw the contents of this drawable component in world transform space.
drawableFlagsChanged(int from, int to) → void
inherited
forAll(DescentCallback cb) bool
inherited
forEachChild(DescentCallback cb) → void
inherited
import(ImportStack stack) bool
inherited
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
markRebuildDependencies() → void
inherited
markTransformDirty() → void
inherited
markWorldTransformDirty() → void
inherited
nameChanged(String from, String to) → void
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
onAdded() → void
inherited
onAddedDirty() → void
inherited
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).
@mustCallSuper, inherited
onStrokesChanged() → void
Called when a stroke is added or remoevd.
opacityChanged(double from, double to) → void
inherited
paintChanged() → void
parentChanged(ContainerComponent? from, ContainerComponent? to) → void
inherited
parentIdChanged(int from, int to) → void
inherited
pathChanged(Path path) → void
prependChild(Component child) → void
inherited
remove() → void
inherited
removeFill(Fill fill) bool
inherited
removePath(Path path) bool
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
resolveArtboard() bool
Find the artboard in the hierarchy.
inherited
rotationChanged(double from, double to) → void
inherited
scaleXChanged(double from, double to) → void
inherited
scaleYChanged(double from, double to) → void
inherited
toString() String
A string representation of this object. [...]
inherited
update(int dirt) → void
updateTransform() → void
inherited
updateWorldTransform() → void
@mustCallSuper, inherited
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.
@mustCallSuper, inherited
xChanged(double from, double to) → void
inherited
yChanged(double from, double to) → void
inherited

Operators

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