| Package | efnx.gfx |
| Class | public class BitmapAnalyzer |
| Property | Defined by | ||
|---|---|---|---|
| dLines : Array [static]
| BitmapAnalyzer | ||
| testBitmapData : BitmapData [static]
| BitmapAnalyzer | ||
| testing : Boolean = false [static]
| BitmapAnalyzer | ||
| Method | Defined by | ||
|---|---|---|---|
|
| BitmapAnalyzer | ||
|
angleBetweenSlopes(m1:Number, m2:Number):Number
[static]
Returns the angle between two lines with slope m1 and m2
| BitmapAnalyzer | ||
|
averageMidPoint(vertices:Array):Point
[static]
Returns the middle point between a set of points by averaging all x's and y's
| BitmapAnalyzer | ||
|
combinePointsBySlope(pointSet:Array, threshold:Number):Array
[static]
Returns a radially ordered set of points that make up a polygon, with all angle above theta
| BitmapAnalyzer | ||
|
combinePointsWithin(vertices:Array, distance:Number = 2):Array
[static]
Finds pairs within a certain distance and combines them to one one point
returns an array of points which are Numbers, not ints
| BitmapAnalyzer | ||
|
createPointsAboutPerimeter(bmd:BitmapData, distance:int = 10, threshold:uint = 0x00):Array
[static]
Fills an array with points spaced somewhat uniformally about the surface of the bitmap
| BitmapAnalyzer | ||
|
distanceBetween(p1:Point, p2:Point):Number
[static]
Returns the distance between two points.
| BitmapAnalyzer | ||
|
findMidPoint(vertices:Array):Point
[static]
HELPER FUNCTIONS
| BitmapAnalyzer | ||
|
findSmallestDistance(vertices:Array):Number
[static]
Returns the smallest distance between any of the points
| BitmapAnalyzer | ||
|
orderPointsRadially(vertices:Array):Array
[static]
Orders an array of points counter clockwise from the midpoint
| BitmapAnalyzer | ||
|
pointOfIntersection(m1:Number, b1:Number, m2:Number, b2:Number):Point
[static]
Returns the point of intersection of two lines
| BitmapAnalyzer | ||
|
slope(p1:Point, p2:Point):Number
[static]
Returns the slope between two points.
| BitmapAnalyzer | ||
|
yIntercept(p:Point, s:Number):Number
[static]
Given a point and the lines slope, determine the y-intercept // y=mx+b b=y-mx
| BitmapAnalyzer | ||
| dLines | property |
public static var dLines:Array
| testBitmapData | property |
public static var testBitmapData:BitmapData
| testing | property |
public static var testing:Boolean = false
| BitmapAnalyzer | () | constructor |
public function BitmapAnalyzer()
| angleBetweenSlopes | () | method |
public static function angleBetweenSlopes(m1:Number, m2:Number):NumberReturns the angle between two lines with slope m1 and m2
Parametersm1:Number |
|
m2:Number |
Number |
| averageMidPoint | () | method |
public static function averageMidPoint(vertices:Array):PointReturns the middle point between a set of points by averaging all x's and y's
Parametersvertices:Array |
Point |
| combinePointsBySlope | () | method |
public static function combinePointsBySlope(pointSet:Array, threshold:Number):ArrayReturns a radially ordered set of points that make up a polygon, with all angle above theta
ParameterspointSet:Array |
|
threshold:Number |
Array |
| combinePointsWithin | () | method |
public static function combinePointsWithin(vertices:Array, distance:Number = 2):ArrayFinds pairs within a certain distance and combines them to one one point returns an array of points which are Numbers, not ints
Parametersvertices:Array |
|
distance:Number (default = 2) |
Array |
| createPointsAboutPerimeter | () | method |
public static function createPointsAboutPerimeter(bmd:BitmapData, distance:int = 10, threshold:uint = 0x00):ArrayFills an array with points spaced somewhat uniformally about the surface of the bitmap
Parametersbmd:BitmapData |
|
distance:int (default = 10) |
|
threshold:uint (default = 0x00) |
Array |
| distanceBetween | () | method |
public static function distanceBetween(p1:Point, p2:Point):NumberReturns the distance between two points.
Parametersp1:Point |
|
p2:Point |
Number |
| findMidPoint | () | method |
public static function findMidPoint(vertices:Array):PointHELPER FUNCTIONS
Parametersvertices:Array |
Point |
| findSmallestDistance | () | method |
public static function findSmallestDistance(vertices:Array):NumberReturns the smallest distance between any of the points
Parametersvertices:Array |
Number |
| orderPointsRadially | () | method |
public static function orderPointsRadially(vertices:Array):ArrayOrders an array of points counter clockwise from the midpoint
Parametersvertices:Array |
Array |
| pointOfIntersection | () | method |
public static function pointOfIntersection(m1:Number, b1:Number, m2:Number, b2:Number):PointReturns the point of intersection of two lines
Parametersm1:Number |
|
b1:Number |
|
m2:Number |
|
b2:Number |
Point |
| slope | () | method |
public static function slope(p1:Point, p2:Point):NumberReturns the slope between two points.
Parametersp1:Point |
|
p2:Point |
Number |
| yIntercept | () | method |
public static function yIntercept(p:Point, s:Number):NumberGiven a point and the lines slope, determine the y-intercept // y=mx+b b=y-mx
Parametersp:Point |
|
s:Number |
Number |