Class Index | File Index

## Classes

- _global_
- Array
- fabric.Circle
- fabric.Color
- fabric.Element
- fabric.Element#cache
- fabric.Ellipse
- fabric.Group
- fabric.Image
- fabric.Intersection
- fabric.Line
- fabric.Object
- fabric.Path
- fabric.PathGroup
- fabric.Point
- fabric.Polygon
- fabric.Polyline
- fabric.Rect
- fabric.Text
- fabric.Triangle
- fabric.util
- fabric.util.array
- fabric.util.object
- fabric.util.string
- Function
- String

# Class fabric.Text

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

Class Summary
Constructor Attributes | Constructor Name and Description
--- | ---
| fabric.Text()

Field Summary
Field Attributes | Field Name and Description
--- | ---
| options
| type

Fields borrowed from class fabric.Object:
  FX_DURATION, FX_TRANSITION, includeDefaultValues, MIN_SCALE_LIMIT, NUM_FRACTION_DIGITS, rotate, stateProperties

Method Summary
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
| initStateProperties()
| 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

Class Detail
fabric.Text()
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

Documentation generated by JsDoc Toolkit 2.4.0 on Thu Oct 14 2010 21:41:43 GMT-0400 (EDT)