跳转到内容

ITextProps

Extends

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

false

Inherited from

TextProps.absolutePositioned

Defined in

src/shapes/Object/types/SerializedObjectProps.ts:72


angle

angle: TDegree

Angle of rotation of an object (in degrees)

Default

0

Inherited from

TextProps.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

TextProps.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

rgb(178,204,255)

Inherited from

TextProps.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

TextProps.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

0.4

Inherited from

TextProps.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

1

Inherited from

TextProps.borderScaleFactor

Defined in

src/shapes/Object/types/BorderProps.ts:39


canvas?

optional canvas: Canvas | StaticCanvas<StaticCanvasEvents>

Inherited from

TextProps.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

TextProps.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

TextProps.centeredScaling

Defined in

src/shapes/Object/types/ObjectTransformProps.ts:36


charSpacing

charSpacing: number

Inherited from

TextProps.charSpacing

Defined in

src/shapes/Text/Text.ts:96


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

TextProps.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

rgb(178,204,255)

Inherited from

TextProps.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

null

Inherited from

TextProps.cornerDashArray

Defined in

src/shapes/Object/types/ControlProps.ts:55


cornerSize

cornerSize: number

Size of object’s controlling corners (in pixels)

Default

13

Inherited from

TextProps.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

TextProps.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

'rect'

Inherited from

TextProps.cornerStyle

Defined in

src/shapes/Object/types/ControlProps.ts:47


direction

direction: CanvasDirection

Inherited from

TextProps.direction

Defined in

src/shapes/Text/Text.ts:108


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

Inherited from

TextProps.evented

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

TextProps.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

rgb(0,0,0)

Inherited from

TextProps.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

nonzero

Inherited from

TextProps.fillRule

Defined in

src/shapes/Object/types/FillStrokeProps.ts:26


flipX

flipX: boolean

When true, an object is rendered as flipped horizontally

Default

false

Inherited from

TextProps.flipX

Defined in

src/shapes/Object/types/BaseProps.ts:70


flipY

flipY: boolean

When true, an object is rendered as flipped vertically

Default

false

Inherited from

TextProps.flipY

Defined in

src/shapes/Object/types/BaseProps.ts:77


fontFamily

fontFamily: string

Inherited from

TextProps.fontFamily

Defined in

src/shapes/Text/Text.ts:100


fontSize

fontSize: number

Inherited from

TextProps.fontSize

Defined in

src/shapes/Text/Text.ts:98


fontStyle

fontStyle: string

Inherited from

TextProps.fontStyle

Defined in

src/shapes/Text/Text.ts:101


fontWeight

fontWeight: string | number

Inherited from

TextProps.fontWeight

Defined in

src/shapes/Text/Text.ts:99


globalCompositeOperation

globalCompositeOperation: GlobalCompositeOperation

Composite rule used for canvas globalCompositeOperation

Default

Inherited from

TextProps.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

TextProps.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

true

Inherited from

TextProps.hasControls

Defined in

src/shapes/Object/types/ControlProps.ts:69


height

height: number

Object height

Default

Inherited from

TextProps.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

null

Inherited from

TextProps.hoverCursor

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

TextProps.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

false

Inherited from

TextProps.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

0

Inherited from

TextProps.left

Defined in

src/shapes/Object/types/BaseProps.ts:11


lineHeight

lineHeight: number

Inherited from

TextProps.lineHeight

Defined in

src/shapes/Text/Text.ts:97


linethrough

linethrough: boolean

Inherited from

TextProps.linethrough

Defined in

src/shapes/Text/Text.ts:106


lockMovementX

lockMovementX: boolean

When true, object horizontal movement is locked

Default

Inherited from

TextProps.lockMovementX

Defined in

src/shapes/Object/types/LockInteractionProps.ts:7


lockMovementY

lockMovementY: boolean

When true, object vertical movement is locked

Default

Inherited from

TextProps.lockMovementY

Defined in

src/shapes/Object/types/LockInteractionProps.ts:14


lockRotation

lockRotation: boolean

When true, object rotation is locked

Default

Inherited from

TextProps.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

TextProps.lockScalingFlip

Defined in

src/shapes/Object/types/LockInteractionProps.ts:56


lockScalingX

lockScalingX: boolean

When true, object horizontal scaling is locked

Default

Inherited from

TextProps.lockScalingX

Defined in

src/shapes/Object/types/LockInteractionProps.ts:28


lockScalingY

lockScalingY: boolean

When true, object vertical scaling is locked

Default

Inherited from

TextProps.lockScalingY

Defined in

src/shapes/Object/types/LockInteractionProps.ts:35


lockSkewingX

lockSkewingX: boolean

When true, object horizontal skewing is locked

Default

Inherited from

TextProps.lockSkewingX

Defined in

src/shapes/Object/types/LockInteractionProps.ts:42


lockSkewingY

lockSkewingY: boolean

When true, object vertical skewing is locked

Default

Inherited from

TextProps.lockSkewingY

Defined in

src/shapes/Object/types/LockInteractionProps.ts:49


minScaleLimit

minScaleLimit: number

Minimum allowed scale value of an object

Default

0

Inherited from

TextProps.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

null

Inherited from

TextProps.moveCursor

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

true

Inherited from

TextProps.noScaleCache

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

true

Inherited from

TextProps.objectCaching

Defined in

src/shapes/Object/types/ObjectProps.ts:37


opacity

opacity: number

Opacity of an object

Default

1

Inherited from

TextProps.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

'left'

Inherited from

TextProps.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

'top'

Inherited from

TextProps.originY

Defined in

src/shapes/Object/types/BaseProps.ts:56


overline

overline: boolean

Inherited from

TextProps.overline

Defined in

src/shapes/Text/Text.ts:105


padding

padding: number

Padding between object and its controlling borders (in pixels)

Default

0

Inherited from

TextProps.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

TextProps.paintFirst

Defined in

src/shapes/Object/types/FillStrokeProps.ts:9


path?

optional path: Path<Partial<PathProps>, SerializedPathProps, ObjectEvents>

Inherited from

TextProps.path

Defined in

src/shapes/Text/Text.ts:109


pathAlign

pathAlign: TPathAlign

Inherited from

TextProps.pathAlign

Defined in

src/shapes/Text/Text.ts:103


pathSide

pathSide: TPathSide

Inherited from

TextProps.pathSide

Defined in

src/shapes/Text/Text.ts:102


perPixelTargetFind

perPixelTargetFind: boolean

When set to true, objects are “found” on canvas on per-pixel basis rather than according to bounding box

Default

Inherited from

TextProps.perPixelTargetFind

Defined in

src/shapes/Object/types/FabricObjectProps.ts:50


scaleX

scaleX: number

Object scale factor (horizontal)

Default

1

Inherited from

TextProps.scaleX

Defined in

src/shapes/Object/types/BaseProps.ts:84


scaleY

scaleY: number

Object scale factor (vertical)

Default

1

Inherited from

TextProps.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

Inherited from

TextProps.selectable

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

Inherited from

TextProps.selectionBackgroundColor

Defined in

src/shapes/Object/types/FabricObjectProps.ts:43


selectionEnd

selectionEnd: number

Inherited from

UniqueITextProps.selectionEnd

Defined in

src/shapes/IText/IText.ts:68


selectionStart

selectionStart: number

Inherited from

UniqueITextProps.selectionStart

Defined in

src/shapes/IText/IText.ts:67


shadow

shadow: null | Shadow

Shadow object representing shadow of this shape

Default

null

Inherited from

TextProps.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

0

Inherited from

TextProps.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

0

Inherited from

TextProps.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

TextProps.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

TextProps.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

null

Inherited from

TextProps.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

null;

Inherited from

TextProps.strokeDashArray

Defined in

src/shapes/Object/types/FillStrokeProps.ts:48


strokeDashOffset

strokeDashOffset: number

Line offset of an object’s stroke

Default

0

Inherited from

TextProps.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

butt

Inherited from

TextProps.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

TextProps.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

4

Inherited from

TextProps.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

false

Default

false

Inherited from

TextProps.strokeUniform

Defined in

src/shapes/Object/types/FillStrokeProps.ts:89


strokeWidth

strokeWidth: number

Width of a stroke used to render this object

Default

1

Inherited from

TextProps.strokeWidth

Defined in

src/shapes/Object/types/FillStrokeProps.ts:41


styles

styles: TextStyle

Inherited from

TextProps.styles

Defined in

src/shapes/Text/Text.ts:119


textAlign

textAlign: string

Inherited from

TextProps.textAlign

Defined in

src/shapes/Text/Text.ts:107


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

0

Inherited from

TextProps.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

24

Inherited from

TextProps.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

true

Inherited from

TextProps.transparentCorners

Defined in

src/shapes/Object/types/ControlProps.ts:21


underline

underline: boolean

Inherited from

TextProps.underline

Defined in

src/shapes/Text/Text.ts:104


visible

visible: boolean

When set to false, an object is not rendered on canvas

Default

Inherited from

TextProps.visible

Defined in

src/shapes/Object/types/SerializedObjectProps.ts:40


width

width: number

Object width

Default

Inherited from

TextProps.width

Defined in

src/shapes/Object/types/BaseProps.ts:27