Skip to content

TransformablePolygon

Isuru Kusumal Rajapakse edited this page Jun 18, 2017 · 2 revisions

new TransformablePolygon()

  • Represents a component that defines a behaviors like transform, center for Polygons etc.
Returns
  • Void

TransformablePolygon.transform(width, height)

Parameters
Name Type Description
width int - desired width.  
height int - desired height.  
Returns
  • Void

TransformablePolygon.resize(byX, byY)

transform the polygon to the given scale

Parameters
Name Type Description
byX int - increse/decrease in width.  
byY int - increse/decrease in height.  
Returns
  • Void

TransformablePolygon.center([x=width/2, y=height/2])

Parameters
Name Type Description
x=width/2 int - desired center in the x-cordinate. Optional
y=height/2 int - desired center in the y-cordinate. Optional
Returns
  • Void

TransformablePolygon.initialise()

initialise the state of the Transformable component

Returns
  • Void

Clone this wiki locally