Class Index | File Index

Classes


Class fabric.Text


Extends fabric.Object.
Text
Defined in: text.class.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Field Summary
Field Attributes Field Name and Description
 
Fields borrowed from class fabric.Object:
FX_DURATION, FX_TRANSITION, includeDefaultValues, MIN_SCALE_LIMIT, NUM_FRACTION_DIGITS, rotate, selectable, stateProperties
Method Summary
Method Attributes Method Name and Description
<static>  
fabric.Text.fromElement(element)
Returns fabric.Text instance from an SVG element (not yet implemented)
<static>  
fabric.Text.fromObject(object)
Returns fabric.Text instance from an object representation
 
Returns actual text value of an instance
 
initialize(text, options)
Constructor
 
render(ctx)
Renders text instance on a specified context
 
set(name, value)
Sets specified property to a specified value
 
setColor(value)
Sets "color" of an instance (alias of `set('fill', …)`)
 
setFontsize(value)
Sets fontsize of an instance and updates its coordinates
 
setText(value)
Sets text of an instance, and updates its coordinates
 
Returns object representation of an instance
 
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, setGradientFill, setOpacity, setOptions, setSourcePath, setupState, straighten, toDatalessObject, toDataURL, toggle, toGrayscale, toJSON, transform
Class Detail
fabric.Text()
Field Detail
{String} type
Method Detail
<static> {fabric.Text} fabric.Text.fromElement(element)
Returns fabric.Text instance from an SVG element (not yet implemented)
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 actual text value of an instance
Returns:
{String}

{fabric.Text} initialize(text, options)
Constructor
Parameters:
{String} text
{Object} options Optional
Returns:
{fabric.Text} thisArg

render(ctx)
Renders text instance on a specified context
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)
Sets "color" of an instance (alias of `set('fill', …)`)
Parameters:
{String} value
Returns:
{fabric.Text} thisArg

{fabric.Text} setFontsize(value)
Sets fontsize of an instance and updates its coordinates
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 representation of an instance
Returns:
{Object} Object representation of text object

{String} toString()
Returns string representation of an instance
Returns:
{String} String representation of text object

Documentation generated by JsDoc Toolkit 2.4.0 on Tue Jun 28 2011 18:47:44 GMT-0400 (EDT)