Polygon

As we all know, polygon is a plane figure that is bounded by a finite chain of 2D line segments. Here, Polygon is an object made of closed form of TextPoint's.

Each polygon can be repositioned by mouse dragging. Moreover, it is also possible to move each PolygonPoint.

Polygon can be initialized by several ways. You can see details on createPolygon function documentation page.

Polygon.draw()

This function clears log screen which located upper-right part of the coding screen. It is on the playground page. This code below first clear the screen, then traverses and prints the polygon points.

Drag Event

Mouse drag event can be triggered, when it is used this way:

  // event triggering to polygon, when it is dragged
  // This part will be implemented later  }