Class fabric.Text
Extends
fabric.Object.
Text
Defined in: text.class.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Field Attributes | Field Name and Description |
---|---|
- Fields borrowed from class fabric.Object:
- FX_DURATION, FX_TRANSITION, includeDefaultValues, MIN_SCALE_LIMIT, NUM_FRACTION_DIGITS, rotate, stateProperties
Method Attributes | Method Name and Description |
---|---|
<static> |
fabric.Text.fromElement(element)
|
<static> |
fabric.Text.fromObject(object)
Returns fabric.Text instance from an object representation
|
getText()
|
|
initialize(text, options)
Constructor
|
|
render(ctx)
|
|
set(name, value)
Sets specified property to a specified value
|
|
setColor(value)
|
|
setFontsize(value)
|
|
setText(value)
Sets text of an instance, and updates its coordinates
|
|
toObject()
|
|
toString()
Returns string representation of an instance
|
- Methods borrowed from class fabric.Object:
- callSuper, clone, cloneAsImage, complexity, drawBorders, drawCorners, fxRemove, fxStraighten, get, getAngle, getCenter, getHeight, getWidth, hasStateChanged, intersectsWithObject, intersectsWithRect, isActive, isContainedWithinRect, isType, saveState, scale, scaleToHeight, scaleToWidth, setActive, setAngle, setCoords, setOpacity, setOptions, setSourcePath, straighten, toDatalessObject, toDataURL, toggle, toGrayscale, toJSON, transform
Field Detail
{Object}
options
{String}
type
Method Detail
<static>
{fabric.Text}
fabric.Text.fromElement(element)
- Parameters:
- element
- Returns:
- {fabric.Text} an instance
<static>
{fabric.Text}
fabric.Text.fromObject(object)
Returns fabric.Text instance from an object representation
- Parameters:
- {Object} object
- to create an instance from
- Returns:
- {fabric.Text} an instance
{String}
getText()
- Returns:
- {String}
{fabric.Text}
initialize(text, options)
Constructor
- Parameters:
- {String} text
- {Object} options Optional
- Returns:
- {fabric.Text} thisArg
initStateProperties()
render(ctx)
- Parameters:
- ctx
- {CanvasRenderingContext2D} context to render on
{fabric.Text}
set(name, value)
Sets specified property to a specified value
- Parameters:
- {String} name
- {Any} value
- Returns:
- {fabric.Text} thisArg
{fabric.Text}
setColor(value)
- Parameters:
- {String} value
- Returns:
- {fabric.Text} thisArg
{fabric.Text}
setFontsize(value)
- Parameters:
- {Number} value
- Returns:
- {fabric.Text} thisArg
{fabric.Text}
setText(value)
Sets text of an instance, and updates its coordinates
- Parameters:
- {String} value
- Returns:
- {fabric.Text} thisArg
{Object}
toObject()
- Returns:
- {Object} Object representation of text object
{String}
toString()
Returns string representation of an instance
- Returns:
- {String} String representation of text object