FabricObjectProps
Extends
ObjectProps
.ControlProps
.BorderProps
.LockInteractionProps
Extended by
Properties
absolutePositioned
absolutePositioned:
boolean
Meaningful ONLY when the object is used as clipPath. if true, the clipPath will have its top and left relative to canvas, and will not be influenced by the object transform. This will make the clipPath relative to the canvas, but clipping just a particular object. WARNING this is beta, this feature may change or be renamed. since 2.4.0
Default
Inherited from
ObjectProps.absolutePositioned
Defined in
src/shapes/Object/types/SerializedObjectProps.ts:72
angle
angle:
TDegree
Angle of rotation of an object (in degrees)
Default
Inherited from
ObjectProps.angle
Defined in
src/shapes/Object/types/BaseProps.ts:63
backgroundColor
backgroundColor:
string
Background color of an object. takes css colors https://www.w3.org/TR/css-color-3/
Default
Inherited from
ObjectProps.backgroundColor
Defined in
src/shapes/Object/types/SerializedObjectProps.ts:26
borderColor
borderColor:
string
Color of controlling borders of an object (when it’s active)
Default
Inherited from
BorderProps.borderColor
Defined in
src/shapes/Object/types/BorderProps.ts:7
borderDashArray
borderDashArray:
null
|number
[]
Array specifying dash pattern of an object’s borders (hasBorder must be true)
Since
1.6.2
Inherited from
BorderProps.borderDashArray
Defined in
src/shapes/Object/types/BorderProps.ts:15
borderOpacityWhenMoving
borderOpacityWhenMoving:
number
Opacity of object’s controlling borders when object is active and moving
Default
Inherited from
BorderProps.borderOpacityWhenMoving
Defined in
src/shapes/Object/types/BorderProps.ts:29
borderScaleFactor
borderScaleFactor:
number
Scale factor of object’s controlling borders bigger number will make a thicker border border is 1, so this is basically a border thickness since there is no way to change the border itself.
Default
Inherited from
BorderProps.borderScaleFactor
Defined in
src/shapes/Object/types/BorderProps.ts:39
canvas?
optional
canvas:Canvas
|StaticCanvas
<StaticCanvasEvents
>
Inherited from
ObjectProps.canvas
Defined in
src/shapes/Object/types/ObjectProps.ts:20
centeredRotation
centeredRotation:
boolean
When true
the object will rotate on its center.
When false
will rotate around the origin point defined by originX and originY.
The value of this property is IGNORED during a transform if the canvas has already
centeredRotation set to true
The object method rotate
will always consider this property and never the canvas’s one.
Since
1.3.4
Default
Inherited from
ObjectProps.centeredRotation
Defined in
src/shapes/Object/types/ObjectTransformProps.ts:27
centeredScaling
centeredScaling:
boolean
When true, this object will use center point as the origin of transformation when being scaled via the controls.
Since
1.3.4
Default
Inherited from
ObjectProps.centeredScaling
Defined in
src/shapes/Object/types/ObjectTransformProps.ts:36
clipPath?
optional
clipPath:BaseFabricObject
<Partial
<ObjectProps
>,SerializedObjectProps
,ObjectEvents
>
a fabricObject that, without stroke define a clipping area with their shape. filled in black the clipPath object gets used when the object has rendered, and the context is placed in the center of the object cacheCanvas. If you want 0,0 of a clipPath to align with an object center, use clipPath.originX/Y to ‘center’
Inherited from
ObjectProps.clipPath
Defined in
src/shapes/Object/types/ObjectProps.ts:16
cornerColor
cornerColor:
string
Color of controlling corners of an object (when it’s active)
Default
Inherited from
ControlProps.cornerColor
Defined in
src/shapes/Object/types/ControlProps.ts:28
cornerDashArray
cornerDashArray:
null
|number
[]
Array specifying dash pattern of an object’s control (hasBorder must be true)
Since
1.6.2
Default
Inherited from
ControlProps.cornerDashArray
Defined in
src/shapes/Object/types/ControlProps.ts:55
cornerSize
cornerSize:
number
Size of object’s controlling corners (in pixels)
Default
Inherited from
ControlProps.cornerSize
Defined in
src/shapes/Object/types/ControlProps.ts:7
cornerStrokeColor
cornerStrokeColor:
string
Color of controlling corners of an object (when it’s active and transparentCorners false)
Since
1.6.2
Default
Inherited from
ControlProps.cornerStrokeColor
Defined in
src/shapes/Object/types/ControlProps.ts:36
cornerStyle
cornerStyle:
"circle"
|"rect"
Specify style of control, ‘rect’ or ‘circle’ This is deprecated. In the future there will be a standard control render And you can swap it with one of the alternative proposed with the control api
Since
1.6.2
Default
Inherited from
ControlProps.cornerStyle
Defined in
src/shapes/Object/types/ControlProps.ts:47
evented
evented:
boolean
When set to false
, an object can not be a target of events. All events propagate through it. Introduced in v1.3.4
Default
Defined in
src/shapes/Object/types/FabricObjectProps.ts:65
excludeFromExport
excludeFromExport:
boolean
When true
, object is not exported in OBJECT/JSON
Since
1.6.3
Default
Inherited from
ObjectProps.excludeFromExport
Defined in
src/shapes/Object/types/ObjectProps.ts:52
fill
fill:
null
|string
|TFiller
Color of object’s fill takes css colors https://www.w3.org/TR/css-color-3/
Default
Inherited from
ObjectProps.fill
Defined in
src/shapes/Object/types/ObjectProps.ts:17
fillRule
fillRule:
CanvasFillRule
Fill rule used to fill an object
accepted values are nonzero, evenodd
Backwards incompatibility note: This property was used for setting globalCompositeOperation until v1.4.12 (use globalCompositeOperation
instead)
Default
Inherited from
ObjectProps.fillRule
Defined in
src/shapes/Object/types/FillStrokeProps.ts:26
flipX
flipX:
boolean
When true, an object is rendered as flipped horizontally
Default
Inherited from
ObjectProps.flipX
Defined in
src/shapes/Object/types/BaseProps.ts:70
flipY
flipY:
boolean
When true, an object is rendered as flipped vertically
Default
Inherited from
ObjectProps.flipY
Defined in
src/shapes/Object/types/BaseProps.ts:77
globalCompositeOperation
globalCompositeOperation:
GlobalCompositeOperation
Composite rule used for canvas globalCompositeOperation
Default
Inherited from
ObjectProps.globalCompositeOperation
Defined in
src/shapes/Object/types/SerializedObjectProps.ts:18
hasBorders
hasBorders:
boolean
When set to false
, object’s controlling borders are not rendered
Default
Inherited from
BorderProps.hasBorders
Defined in
src/shapes/Object/types/BorderProps.ts:22
hasControls
hasControls:
boolean
When set to false
, object’s controls are not displayed and can not be used to manipulate object
Default
Inherited from
ControlProps.hasControls
Defined in
src/shapes/Object/types/ControlProps.ts:69
height
height:
number
Object height
Default
Inherited from
ObjectProps.height
Defined in
src/shapes/Object/types/BaseProps.ts:34
hoverCursor
hoverCursor:
null
|string
Default cursor value used when hovering over this object on canvas
Default
Defined in
src/shapes/Object/types/FabricObjectProps.ts:27
includeDefaultValues
includeDefaultValues:
boolean
When false
, default object’s values are not included in its serialization
Default
Inherited from
ObjectProps.includeDefaultValues
Defined in
src/shapes/Object/types/ObjectProps.ts:44
inverted
inverted:
boolean
Meaningful ONLY when the object is used as clipPath. if true, the clipPath will make the object clip to the outside of the clipPath since 2.4.0
Default
Inherited from
ObjectProps.inverted
Defined in
src/shapes/Object/types/SerializedObjectProps.ts:60
left
left:
number
Left position of an object. Note that by default it’s relative to object left. You can change this by setting originX
Default
Inherited from
ObjectProps.left
Defined in
src/shapes/Object/types/BaseProps.ts:11
lockMovementX
lockMovementX:
boolean
When true
, object horizontal movement is locked
Default
Inherited from
LockInteractionProps.lockMovementX
Defined in
src/shapes/Object/types/LockInteractionProps.ts:7
lockMovementY
lockMovementY:
boolean
When true
, object vertical movement is locked
Default
Inherited from
LockInteractionProps.lockMovementY
Defined in
src/shapes/Object/types/LockInteractionProps.ts:14
lockRotation
lockRotation:
boolean
When true
, object rotation is locked
Default
Inherited from
LockInteractionProps.lockRotation
Defined in
src/shapes/Object/types/LockInteractionProps.ts:21
lockScalingFlip
lockScalingFlip:
boolean
When true
, object cannot be flipped by scaling into negative values
Default
Inherited from
LockInteractionProps.lockScalingFlip
Defined in
src/shapes/Object/types/LockInteractionProps.ts:56
lockScalingX
lockScalingX:
boolean
When true
, object horizontal scaling is locked
Default
Inherited from
LockInteractionProps.lockScalingX
Defined in
src/shapes/Object/types/LockInteractionProps.ts:28
lockScalingY
lockScalingY:
boolean
When true
, object vertical scaling is locked
Default
Inherited from
LockInteractionProps.lockScalingY
Defined in
src/shapes/Object/types/LockInteractionProps.ts:35
lockSkewingX
lockSkewingX:
boolean
When true
, object horizontal skewing is locked
Default
Inherited from
LockInteractionProps.lockSkewingX
Defined in
src/shapes/Object/types/LockInteractionProps.ts:42
lockSkewingY
lockSkewingY:
boolean
When true
, object vertical skewing is locked
Default
Inherited from
LockInteractionProps.lockSkewingY
Defined in
src/shapes/Object/types/LockInteractionProps.ts:49
minScaleLimit
minScaleLimit:
number
Minimum allowed scale value of an object
Default
Inherited from
ObjectProps.minScaleLimit
Defined in
src/shapes/Object/types/ObjectProps.ts:27
moveCursor
moveCursor:
null
|string
Default cursor value used when moving this object on canvas
Default
Defined in
src/shapes/Object/types/FabricObjectProps.ts:34
noScaleCache?
optional
noScaleCache:boolean
When true
, cache does not get updated during scaling. The picture will get blocky if scaled
too much and will be redrawn with correct details at the end of scaling.
this setting is performance and application dependant.
default to true
since 1.7.0
Default
Defined in
src/shapes/Object/types/FabricObjectProps.ts:20
objectCaching
objectCaching:
boolean
When true
, object is cached on an additional canvas.
When false
, object is not cached unless necessary ( clipPath )
default to true
Since
1.7.0
Default
Inherited from
ObjectProps.objectCaching
Defined in
src/shapes/Object/types/ObjectProps.ts:37
opacity
opacity:
number
Opacity of an object
Default
Inherited from
ObjectProps.opacity
Defined in
src/shapes/Object/types/SerializedObjectProps.ts:11
originX
originX:
TOriginX
Horizontal origin of transformation of an object (left
, center
, right
or [0, 1]
)
See http://jsfiddle.net/1ow02gea/244/ on how originX/originY affect objects in groups
Default
Inherited from
ObjectProps.originX
Defined in
src/shapes/Object/types/BaseProps.ts:45
originY
originY:
TOriginY
Vertical origin of transformation of an object (top
, center
, bottom
or [0, 1]
)
See http://jsfiddle.net/1ow02gea/244/ on how originX/originY affect objects in groups
Default
Inherited from
ObjectProps.originY
Defined in
src/shapes/Object/types/BaseProps.ts:56
padding
padding:
number
Padding between object and its controlling borders (in pixels)
Default
Inherited from
ControlProps.padding
Defined in
src/shapes/Object/types/ControlProps.ts:62
paintFirst
paintFirst:
"fill"
|"stroke"
Determines if the fill or the stroke is drawn first (one of “fill” or “stroke”)
Default
Inherited from
ObjectProps.paintFirst
Defined in
src/shapes/Object/types/FillStrokeProps.ts:9
perPixelTargetFind
perPixelTargetFind:
boolean
When set to true
, objects are “found” on canvas on per-pixel basis rather than according to bounding box
Default
Defined in
src/shapes/Object/types/FabricObjectProps.ts:50
scaleX
scaleX:
number
Object scale factor (horizontal)
Default
Inherited from
ObjectProps.scaleX
Defined in
src/shapes/Object/types/BaseProps.ts:84
scaleY
scaleY:
number
Object scale factor (vertical)
Default
Inherited from
ObjectProps.scaleY
Defined in
src/shapes/Object/types/BaseProps.ts:91
selectable
selectable:
boolean
When set to false
, an object can not be selected for modification (using either point-click-based or group-based selection).
But events still fire on it.
Default
Defined in
src/shapes/Object/types/FabricObjectProps.ts:58
selectionBackgroundColor
selectionBackgroundColor:
string
Selection Background color of an object. colored layer behind the object when it is active. does not mix good with globalCompositeOperation methods.
Default
Defined in
src/shapes/Object/types/FabricObjectProps.ts:43
shadow
shadow:
null
|Shadow
Shadow object representing shadow of this shape
Default
Inherited from
ObjectProps.shadow
Defined in
src/shapes/Object/types/ObjectProps.ts:19
skewX
skewX:
TDegree
Angle of skew on x axes of an object (in degrees)
Default
Inherited from
ObjectProps.skewX
Defined in
src/shapes/Object/types/BaseProps.ts:98
skewY
skewY:
TDegree
Angle of skew on y axes of an object (in degrees)
Default
Inherited from
ObjectProps.skewY
Defined in
src/shapes/Object/types/BaseProps.ts:105
snapAngle?
optional
snapAngle:TDegree
The angle that an object will lock to while rotating.
Inherited from
ObjectProps.snapAngle
Defined in
src/shapes/Object/types/ObjectTransformProps.ts:8
snapThreshold?
optional
snapThreshold:TDegree
The angle difference from the current snapped angle in which snapping should occur. When undefined, the snapThreshold will default to the snapAngle.
Inherited from
ObjectProps.snapThreshold
Defined in
src/shapes/Object/types/ObjectTransformProps.ts:15
stroke
stroke:
null
|string
|TFiller
When defined, an object is rendered via stroke and this property specifies its color takes css colors https://www.w3.org/TR/css-color-3/
Default
Inherited from
ObjectProps.stroke
Defined in
src/shapes/Object/types/ObjectProps.ts:18
strokeDashArray
strokeDashArray:
null
|number
[]
Array specifying dash pattern of an object’s stroke (stroke must be defined)
Default
Inherited from
ObjectProps.strokeDashArray
Defined in
src/shapes/Object/types/FillStrokeProps.ts:48
strokeDashOffset
strokeDashOffset:
number
Line offset of an object’s stroke
Default
Inherited from
ObjectProps.strokeDashOffset
Defined in
src/shapes/Object/types/FillStrokeProps.ts:55
strokeLineCap
strokeLineCap:
CanvasLineCap
Line endings style of an object’s stroke (one of “butt”, “round”, “square”)
Default
Inherited from
ObjectProps.strokeLineCap
Defined in
src/shapes/Object/types/FillStrokeProps.ts:62
strokeLineJoin
strokeLineJoin:
CanvasLineJoin
Corner style of an object’s stroke (one of “bevel”, “round”, “miter”)
Default
Inherited from
ObjectProps.strokeLineJoin
Defined in
src/shapes/Object/types/FillStrokeProps.ts:69
strokeMiterLimit
strokeMiterLimit:
number
Maximum miter length (used for strokeLineJoin = “miter”) of an object’s stroke
Default
Inherited from
ObjectProps.strokeMiterLimit
Defined in
src/shapes/Object/types/FillStrokeProps.ts:76
strokeUniform
strokeUniform:
boolean
When false
, the stoke width will scale with the object.
When true
, the stroke will always match the exact pixel size entered for stroke width.
this Property does not work on Text classes or drawing call that uses strokeText,fillText methods
default to false
Since
2.6.0
Default
Default
Inherited from
ObjectProps.strokeUniform
Defined in
src/shapes/Object/types/FillStrokeProps.ts:89
strokeWidth
strokeWidth:
number
Width of a stroke used to render this object
Default
Inherited from
ObjectProps.strokeWidth
Defined in
src/shapes/Object/types/FillStrokeProps.ts:41
top
top:
number
Top position of an object. Note that by default it’s relative to object top. You can change this by setting originY
Default
Inherited from
ObjectProps.top
Defined in
src/shapes/Object/types/BaseProps.ts:20
touchCornerSize
touchCornerSize:
number
Size of object’s controlling corners when touch interaction is detected
Default
Inherited from
ControlProps.touchCornerSize
Defined in
src/shapes/Object/types/ControlProps.ts:14
transparentCorners
transparentCorners:
boolean
When true, object’s controlling corners are rendered as transparent inside (i.e. stroke instead of fill)
Default
Inherited from
ControlProps.transparentCorners
Defined in
src/shapes/Object/types/ControlProps.ts:21
visible
visible:
boolean
When set to false
, an object is not rendered on canvas
Default
Inherited from
ObjectProps.visible
Defined in
src/shapes/Object/types/SerializedObjectProps.ts:40
width
width:
number
Object width
Default
Inherited from
ObjectProps.width