Polygon
Defined in: shapes/polygon.ts:5
Represents an object that is defined by an SVG path.
Extends
Constructors
Constructor
new Polygon(
x,y,points):Polygon
Defined in: shapes/polygon.ts:8
Parameters
x
number = 0
y
number = 0
points
Vector2[] = []
Returns
Polygon
Overrides
Properties
animate
animate:
object
Defined in: wobject.ts:15
fill
fill:
TweenerFactory<"fill",ColorLike>
position
position:
TweenerFactory<"position">
rotate
rotate:
TweenerFactory<"rotate">
scale
scale:
TweenerFactory<"scale">
scaleX
scaleX:
TweenerFactory<"scaleX">
scaleY
scaleY:
TweenerFactory<"scaleY">
x
x:
TweenerFactory<"x">
y
y:
TweenerFactory<"y">
Inherited from
element
element:
SVGPathElement
Defined in: wobject.ts:14
The DOM element that represents the object’s visual.
Inherited from
path
path:
WPath
Defined in: wpathobject.ts:11
The path defining the object.
Inherited from
points
points:
Vector2[]
Defined in: shapes/polygon.ts:6
Accessors
size
Get Signature
get size():
Vector2
Defined in: wobject.ts:194
Returns
Inherited from
visible
Get Signature
get visible():
boolean
Defined in: wobject.ts:186
Returns
boolean
Set Signature
set visible(
v):void
Defined in: wobject.ts:189
Parameters
v
boolean
Returns
void
Inherited from
Methods
anchor()
Call Signature
anchor():
Anchor
Defined in: wobject.ts:174
Returns
Inherited from
Call Signature
anchor(
value):this
Defined in: wobject.ts:175
Parameters
value
Returns
this
Inherited from
createElement()
createElement():
SVGPathElement
Defined in: wpathobject.ts:24
Returns
SVGPathElement
Inherited from
fill()
Call Signature
fill():
ColorInstance
Defined in: wobject.ts:66
Returns
ColorInstance
Inherited from
Call Signature
fill(
color):this
Defined in: wobject.ts:67
Parameters
color
ColorLike
Returns
this
Inherited from
fillOpacity()
Call Signature
fillOpacity():
number
Defined in: wobject.ts:78
Returns
number
Inherited from
Call Signature
fillOpacity(
value):this
Defined in: wobject.ts:79
Parameters
value
number
Returns
this
Inherited from
hide()
hide():
void
Defined in: wobject.ts:207
Returns
void
Inherited from
position()
Call Signature
position():
Vector2
Defined in: wobject.ts:54
Returns
Inherited from
Call Signature
position(
value):this
Defined in: wobject.ts:55
Parameters
value
Returns
this
Inherited from
renderPath()
renderPath():
void
Defined in: wpathobject.ts:31
Sets the DOM elements path definition to the current path’s definition.
Returns
void
Inherited from
rotate()
Call Signature
rotate():
number
Defined in: wobject.ts:162
Returns
number
Inherited from
Call Signature
rotate(
value):this
Defined in: wobject.ts:163
Parameters
value
number
Returns
this
Inherited from
scale()
Call Signature
scale():
Vector2
Defined in: wobject.ts:150
Returns
Inherited from
Call Signature
scale(
value):this
Defined in: wobject.ts:151
Parameters
value
Returns
this
Inherited from
scaleX()
Call Signature
scaleX():
number
Defined in: wobject.ts:126
Returns
number
Inherited from
Call Signature
scaleX(
value):this
Defined in: wobject.ts:127
Parameters
value
number
Returns
this
Inherited from
scaleY()
Call Signature
scaleY():
number
Defined in: wobject.ts:138
Returns
number
Inherited from
Call Signature
scaleY(
value):this
Defined in: wobject.ts:139
Parameters
value
number
Returns
this
Inherited from
show()
show():
void
Defined in: wobject.ts:211
Returns
void
Inherited from
stroke()
Call Signature
stroke():
ColorInstance
Defined in: wobject.ts:90
Returns
ColorInstance
Inherited from
Call Signature
stroke(
color):this
Defined in: wobject.ts:91
Parameters
color
ColorLike
Returns
this
Inherited from
strokeOpacity()
Call Signature
strokeOpacity():
number
Defined in: wobject.ts:102
Returns
number
Inherited from
Call Signature
strokeOpacity(
value):this
Defined in: wobject.ts:103
Parameters
value
number
Returns
this
Inherited from
strokeWidth()
Call Signature
strokeWidth():
number
Defined in: wobject.ts:114
Returns
number
Inherited from
Call Signature
strokeWidth(
value):this
Defined in: wobject.ts:115
Parameters
value
number
Returns
this
Inherited from
updateFill()
updateFill():
void
Defined in: wobject.ts:237
Returns
void
Inherited from
updateStroke()
updateStroke():
void
Defined in: wobject.ts:231
Returns
void
Inherited from
updateTransform()
updateTransform():
void
Defined in: wobject.ts:215
Returns
void
Inherited from
x()
Call Signature
x():
number
Defined in: wobject.ts:30
Returns
number
Inherited from
Call Signature
x(
value):this
Defined in: wobject.ts:31
Parameters
value
number
Returns
this
Inherited from
y()
Call Signature
y():
number
Defined in: wobject.ts:42
Returns
number
Inherited from
Call Signature
y(
value):this
Defined in: wobject.ts:43
Parameters
value
number
Returns
this
Inherited from
fromSVGPath()
staticfromSVGPath(pathDefinition):WPathObject
Defined in: wpathobject.ts:36
Parameters
pathDefinition
string