| Package | org.ffilmation.utils.polygons |
| Class | public 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.
| Property | Defined by | ||
|---|---|---|---|
| contours : Array The solid contours in this polygon
| fPolygon | ||
| holes : Array The holes in this polygon
| fPolygon | ||
| Method | Defined 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 | ||
| contours | property |
public var contours:ArrayThe solid contours in this polygon
| holes | property |
public var holes:ArrayThe holes in this polygon
| draw | () | method |
public function draw(canvas:Graphics):voidDraws the polygon into the supplied graphics object Does not clear(), beginFill() or endFill() so it can be used in any context
Parameterscanvas:Graphics — Where polygon is to be drawn
|
| isPointInside | () | method |
public function isPointInside(x:Number, y:Number):BooleanReturns if a point is inside the polygon.
Parametersx:Number — X coordibate for the point to be tested
|
|
y:Number — Y coordibate for the point to be tested
|
Boolean — A Boolean value
|