Class fabric.Path
Extends
fabric.Object.
Path
Defined in: path.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, options, rotate, stateProperties
Method Attributes | Method Name and Description |
---|---|
Returns number representation of an instance complexity
|
|
<static> |
fabric.Path.fromElement(element, options)
Creates an instance of fabric.Path from an SVG
|
<static> |
fabric.Path.fromObject(object)
Creates an instance of fabric.Path from an object
|
initialize(path, options)
Constructor
|
|
render(ctx, noTransform)
|
|
set(prop, value)
|
|
toObject()
|
|
toString()
Returns string representation of an instance
|
- Methods borrowed from class fabric.Object:
- callSuper, clone, cloneAsImage, 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, toDataURL, toggle, toGrayscale, toJSON, transform
Field Detail
{String}
type
Method Detail
{Number}
complexity()
Returns number representation of an instance complexity
- Returns:
- {Number} complexity
<static>
{fabric.Path}
fabric.Path.fromElement(element, options)
Creates an instance of fabric.Path from an SVG element
- Parameters:
- {SVGElement} element
- to parse
- {Object} options
- object
- Returns:
- {fabric.Path} Instance of fabric.Path
<static>
{fabric.Path}
fabric.Path.fromObject(object)
Creates an instance of fabric.Path from an object
- Parameters:
- object
- Returns:
- {fabric.Path} Instance of fabric.Path
initialize(path, options)
Constructor
- Parameters:
- {Array|String} path
- Path data (sequence of coordinates and corresponding "command" tokens)
- {Object} options Optional
- Options object
render(ctx, noTransform)
- Parameters:
- ctx
- noTransform
set(prop, value)
- Parameters:
- prop
- value
{Object}
toDatalessObject()
- Returns:
- {Object}
{Object}
toObject()
- Returns:
- {Object}
{String}
toString()
Returns string representation of an instance
- Returns:
- {String} string representation of an instance