Packageorg.ffilmation.utils.polygons
Classpublic class fPolygon

A Polygon is an array of contours and one of holes. Both a "contour" and a "hole" are arrays of Points. Both contours and holes must be in the same winding order ( either clockwise or counter-clockwise ) for the algorythms to work.



Public Properties
 PropertyDefined by
  contours : Array
The solid contours in this polygon
fPolygon
  holes : Array
The holes in this polygon
fPolygon
Public Methods
 MethodDefined by
  
draw(canvas:Graphics):void
Draws the polygon into the supplied graphics object Does not clear(), beginFill() or endFill() so it can be used in any context
fPolygon
  
isPointInside(x:Number, y:Number):Boolean
Returns if a point is inside the polygon.
fPolygon
Property detail
contoursproperty
public var contours:Array

The solid contours in this polygon

holesproperty 
public var holes:Array

The holes in this polygon

Method detail
draw()method
public function draw(canvas:Graphics):void

Draws the polygon into the supplied graphics object Does not clear(), beginFill() or endFill() so it can be used in any context

Parameters
canvas:Graphics — Where polygon is to be drawn
isPointInside()method 
public function isPointInside(x:Number, y:Number):Boolean

Returns if a point is inside the polygon.

Parameters
x:Number — X coordibate for the point to be tested
 
y:Number — Y coordibate for the point to be tested

Returns
Boolean — A Boolean value