FabricObject class abstract
Constructors
Properties
- angle ↔ dynamic
-
getter/setter pair
- borderColor ↔ dynamic
-
getter/setter pair
- cacheProperties → dynamic
-
no setter
- canvas ↔ Canvas?
-
getter/setter pair
- cornerSize ↔ dynamic
-
Size of object's controlling corners (in pixels)
@type Number
@default
getter/setter pair
- dirty ↔ dynamic
-
getter/setter pair
- getStateProperties → dynamic
-
Available on FabricObject, provided by the FabricObjectExtension extension
no setter - group ↔ dynamic
-
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- height ↔ num
-
getter/setter pair
- id ↔ dynamic
-
getter/setter pair
- left ↔ dynamic
-
getter/setter pair
- originX ↔ dynamic
-
getter/setter pair
- originY ↔ dynamic
-
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- rx ↔ num
-
getter/setter pair
- ry ↔ num
-
getter/setter pair
- scaleX ↔ num
-
getter/setter pair
- scaleY ↔ num
-
getter/setter pair
- selectable ↔ dynamic
-
getter/setter pair
- stateProperties → dynamic
-
no setter
-
statePropertiesAsMap
→ Map<
String, dynamic> ? -
Available on FabricObject, provided by the FabricObjectExtension extension
no setter -
statePropertiesKeys
→ List<
String> -
Available on FabricObject, provided by the FabricObjectExtension extension
no setter - strokeUniform ↔ dynamic
-
getter/setter pair
- strokeWidth ↔ dynamic
-
getter/setter pair
- top ↔ dynamic
-
getter/setter pair
- type ↔ dynamic
-
getter/setter pair
- width ↔ num
-
getter/setter pair
Methods
-
adjustPosition(
String to) → void -
bringForward(
[bool intersecting]) → FabricObject - functions from object stacking mixin
-
bringToFront(
) → FabricObject - Moves an object to the top of the stack of drawn objects
-
calcCoords(
[bool absolute]) → dynamic - Calculate and returns the .coords of an object. @chainable
-
center(
) → FabricObject -
centerH(
) → FabricObject -
centerV(
) → FabricObject -
clone(
Function callback, [List< String> propertiesToInclude]) → void -
forEachObject(
void callback(FabricObject element, num index, List< FabricObject> array), [dynamic context]) → dynamic - Executes given function for each object in this group
-
get(
dynamic propName) → dynamic -
getBoundingRect(
[bool absolute, bool calculate]) → BoundingRect - Returns coordinates of object's bounding rectangle (left, top, width, height) the box is intented as aligned to axis of canvas.
-
getCenterPoint(
) → Point - Returns the real center coordinates of the object
-
getPointByOrigin(
String originX, String originY) → Point - Returns the coordinates of the object as if it has a different origin
-
getScaledHeight(
) → num -
getScaledWidth(
) → num -
moveTo(
num index) → FabricObject - Moves an object to specified level in stack of drawn objects
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onDeselect(
dynamic options) → bool -
onSelect(
dynamic options) → bool - This callback function is called every time _discardActiveObject or _setActiveObject try to to select this object. If the function returns true, the process is cancelled
-
rotate(
num angle) → FabricObject -
saveState(
[dynamic options]) → FabricObject - Saves state of an object
-
scale(
num value) → FabricObject - Scales an object (equally by x and y)
-
scaleToHeight(
num value, [bool absolute]) → FabricObject - Scales an object to a given height, with respect to bounding box (scaling by x/y equally)
-
scaleToWidth(
num value, [bool absolute]) → FabricObject - Scales an object to a given width, with respect to bounding box (scaling by x/y equally)
-
sendBackwards(
[bool intersecting]) → FabricObject - Moves an object down in stack of drawn objects
-
sendToBack(
) → FabricObject - Moves an object to the bottom of the stack of drawn objects
-
set(
dynamic propNameOrMap, [dynamic val]) → FabricObject - rect.set('fill', 'red'); rect.set({ strokeWidth: 5, stroke: 'rgba(100,200,200,0.5)' }); rect.set('angle', 15).set('flipY', true);
-
setAngle(
num angle) → dynamic -
setCoords(
) → dynamic -
setPositionByOrigin(
Point pos, String originX, String originY) → void - Sets the position of the object taking into consideration the object's origin
-
toActiveSelection(
) → ActiveSelection -
toGroup(
) → Group -
toLocalPoint(
Point point, String originX, String originY) → Point - Returns the point in local coordinates
-
toObject(
[List< String> propertiesToInclude]) → dynamic -
toString(
) → String -
A string representation of this object.
inherited
-
translateToCenterPoint(
Point point, String originX, String originY) → Point - functions from object origin mixin
-
translateToOriginPoint(
Point center, String originX, String originY) → Point - Translates the coordinates from center to origin coordinates (based on the object's dimensions)
-
viewportCenter(
) → FabricObject -
viewportCenterH(
) → FabricObject -
viewportCenterV(
) → FabricObject
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited