Class fabric.Rect
Extends
fabric.Object.
Rect
Defined in: rect.class.js.
| Constructor Attributes | Constructor Name and Description |
|---|---|
| Field Attributes | Field Name and Description |
|---|---|
| <static> |
fabric.Rect.ATTRIBUTE_NAMES
List of attribute names to account for when parsing SVG element (used by `fabric.Rect.fromElement`)
|
- Fields borrowed from class fabric.Object:
- FX_DURATION, FX_TRANSITION, includeDefaultValues, MIN_SCALE_LIMIT, NUM_FRACTION_DIGITS, rotate, selectable, stateProperties
| Method Attributes | Method Name and Description |
|---|---|
| <static> |
fabric.Rect.fromElement(element, options)
Returns fabric.Rect instance from an SVG element
|
| <static> |
fabric.Rect.fromObject(object)
Returns fabric.Rect instance from an object representation
|
|
initialize(options)
Constructor
|
- Methods borrowed from class fabric.Object:
- callSuper, clone, cloneAsImage, drawBorders, drawCorners, fxRemove, fxStraighten, get, getAngle, getCenter, getHeight, getWidth, hasStateChanged, intersectsWithObject, intersectsWithRect, isActive, isContainedWithinRect, isType, render, saveState, scale, scaleToHeight, scaleToWidth, set, setActive, setAngle, setCoords, setGradientFill, setOpacity, setOptions, setSourcePath, setupState, straighten, toDatalessObject, toDataURL, toggle, toGrayscale, toJSON, toObject, toString, transform
Field Detail
<static>
fabric.Rect.ATTRIBUTE_NAMES
List of attribute names to account for when parsing SVG element (used by `fabric.Rect.fromElement`)
{Object}
options
{String}
type
Method Detail
{Number}
complexity()
- Returns:
- {Number} complexity
<static>
{fabric.Rect}
fabric.Rect.fromElement(element, options)
Returns fabric.Rect instance from an SVG element
- Parameters:
- element
- {SVGElement} element to parse
- options
- {Object} options object
- Returns:
- {fabric.Rect} instance of fabric.Rect
<static>
{Object}
fabric.Rect.fromObject(object)
Returns fabric.Rect instance from an object representation
- Parameters:
- object
- {Object} object to create an instance from
- Returns:
- {Object} instance of fabric.Rect
{Object}
initialize(options)
Constructor
- Parameters:
- options
- {Object} options object
- Returns:
- {Object} thisArg