| Package | com.degrafa.geometry |
| Class | public class AdvancedCubicBezier |
| Inheritance | AdvancedCubicBezier CubicBezier Geometry DegrafaObject |
| Method | Defined by | ||
|---|---|---|---|
|
AdvancedCubicBezier(x0:Number, y0:Number, cx:Number, cy:Number, cx1:Number, cy1:Number, x1:Number, y1:Number)
Constructor.
| AdvancedCubicBezier | ||
![]() |
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = true):void
Registers an event listener object with an EventDispatcher object so that the listener receives notification of an event.
| DegrafaObject | |
![]() |
angleAt(t:Number):Number
Returns the angle of a point t(0-1) on the path.
| Geometry | |
![]() |
calculateLayout(childBounds:Rectangle = null):void
Performs the specific layout work required by this Geometry.
| CubicBezier | |
![]() |
clearGraphicsTargets():void
Clears all graphics targets specified in the graphicsTarget array.
| Geometry | |
![]() |
dispatchEvent(evt:Event):Boolean
Dispatches an event into the event flow.
| DegrafaObject | |
![]() |
dispatchPropertyChange(bubbles:Boolean = false, property:Object = null, oldValue:Object = null, newValue:Object = null, source:Object = null):Boolean
Dispatches an property change event into the event flow.
| DegrafaObject | |
![]() |
draw(graphics:Graphics, rc:Rectangle):void
Begins the draw phase for geometry objects.
| CubicBezier | |
![]() |
drawToTargets():void
Requests a draw for each graphics target specified in the graphicsTarget array.
| Geometry | |
![]() |
endDraw(graphics:Graphics):void
Ends the draw phase for geometry objects.
| Geometry | |
![]() |
hasEventListener(type:String):Boolean
Checks whether the EventDispatcher object has any listeners registered for a specific type of event.
| DegrafaObject | |
![]() |
initChange(property:String, oldValue:Object, newValue:Object, source:Object):void
Helper function for dispatching property changes
| DegrafaObject | |
![]() |
initFill(graphics:Graphics, rc:Rectangle):void
Initialise the fill for this geometry object.
| Geometry | |
![]() |
initialized(document:Object, id:String):void
Called after the implementing object has been created and all component properties specified on the MXML tag have been initialized.
| DegrafaObject | |
![]() |
initStroke(graphics:Graphics, rc:Rectangle):void
Initialise the stroke for this geometry object.
| Geometry | |
|
interpolate(points:Array):Array
interpolate
Compute control points so that quadratic Bezier passes through three points at the specified parameter value. | AdvancedCubicBezier | ||
|
pointAt(_t:Number):Point
| AdvancedCubicBezier | ||
|
preDraw():void
Performs any pre calculation that is required to successfully render
this element.
| AdvancedCubicBezier | ||
![]() |
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Removes a listener from the EventDispatcher object.
| DegrafaObject | |
![]() |
styleChanged(styleProp:String):void
Called when the value of a style property is changed.
| Geometry | |
|
tAtMaxX():Number
tAtMaxX
Find t-parameter at which the x-coordinate is a maximum. | AdvancedCubicBezier | ||
|
tAtMaxY():Number
tAtMaxY
Find t-parameter at which the y-coordinate is a maximum. | AdvancedCubicBezier | ||
|
tAtMinX():Number
tAtMinX
Find t-parameter at which the x-coordinate is a minimum. | AdvancedCubicBezier | ||
|
tAtMinY():Number
tAtMinY
Find t-parameter at which the y-coordinate is a minimum. | AdvancedCubicBezier | ||
![]() |
willTrigger(type:String):Boolean
Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type.
| DegrafaObject | |
|
xAtY(_y:Number):Array
xAtY
Return the set of x-coordinates corresponding to the input y-coordinate. | AdvancedCubicBezier | ||
|
yAtX(_x:Number):Array
yAtX
Return the set of y-coordinates corresponding to the input x-coordinate. | AdvancedCubicBezier | ||
| AdvancedCubicBezier | () | constructor |
public function AdvancedCubicBezier(x0:Number, y0:Number, cx:Number, cy:Number, cx1:Number, cy1:Number, x1:Number, y1:Number)Constructor.
The advanced cubic Bézier constructor accepts 8 optional arguments that define it's start, end and controls points.
Parametersx0:Number — A number indicating the starting x-axis coordinate.
|
|
y0:Number — A number indicating the starting y-axis coordinate.
|
|
cx:Number — A number indicating the first control x-axis coordinate.
|
|
cy:Number — A number indicating the first control y-axis coordinate.
|
|
cx1:Number — A number indicating the second control x-axis coordinate.
|
|
cy1:Number — A number indicating the second control y-axis coordinate.
|
|
x1:Number — A number indicating the ending x-axis coordinate.
|
|
y1:Number — A number indicating the ending y-axis coordinate.
|
| interpolate | () | method |
public function interpolate(points:Array):Arrayinterpolate
Compute control points so that quadratic Bezier passes through three points at the specified parameter value. Parameters
points:Array — - array of three Point references, representing the coordinates of the interpolation points.
|
Array — Array the parameter values in [0,1] at which the Bezier curve passes through the second and third interpolation points (determined by a chord-length parameterization).
A negative value is returned if less than three interpolation points are provided.
|
| pointAt | () | method |
public override function pointAt(_t:Number):PointParameters
_t:Number |
Point |
| preDraw | () | method |
public override function preDraw():voidPerforms any pre calculation that is required to successfully render this element. Including bounds calculations and lower level drawing command storage. Each geometry object overrides this and is responsible for it's own pre calculation cycle.
| tAtMaxX | () | method |
public function tAtMaxX():NumbertAtMaxX
Find t-parameter at which the x-coordinate is a maximum.
ReturnsNumber — Number Parameter value in [0,1] at which the cubic Bezier curve's x-coordinate is a maximum.
|
| tAtMaxY | () | method |
public function tAtMaxY():NumbertAtMaxY
Find t-parameter at which the y-coordinate is a maximum.
ReturnsNumber — Number Parameter value in [0,1] at which the cubic Bezier curve's y-coordinate is a maximum.
|
| tAtMinX | () | method |
public function tAtMinX():NumbertAtMinX
Find t-parameter at which the x-coordinate is a minimum.
ReturnsNumber — Number Parameter value in [0,1] at which the cubic Bezier curve's x-coordinate is a minimum
|
| tAtMinY | () | method |
public function tAtMinY():NumbertAtMinY
Find t-parameter at which the y-coordinate is a minimum.
ReturnsNumber — Number - Parameter value in [0,1] at which the cubic Bezier curve's y-coordinate is a minimum.
|
| xAtY | () | method |
public function xAtY(_y:Number):ArrayxAtY
Return the set of x-coordinates corresponding to the input y-coordinate.
Parameters_y:Number — y-coordinate at which the desired x-coordinates are desired
|
Array — Array set of (t,x)-coordinates at the input y-coordinate provided that the y-coordinate is inside the range
covered by the quadratic Bezier in [0,1]; that is there must exist t in [0,1] such that By(t) = _y. If the input
y-coordinate is not inside the range covered by the Bezier curve, the returned array is empty. Otherwise, the
array contains either one, two, or three x-coordinates. There are issues with curves that are exactly or nearly (for
numerical purposes) horizontal in which there could theoretically be an infinite number of x-coordinates for a single
y-coordinate. This method does not work in such cases, although compensation might be added in the future.
Each array element is a reference to an |
| yAtX | () | method |
public function yAtX(_x:Number):ArrayyAtX
Return the set of y-coordinates corresponding to the input x-coordinate.
Parameters_x:Number — x-coordinate at which the desired y-coordinates are desired
|
Array — Array set of (t,y)-coordinates at the input x-coordinate provided that the x-coordinate is inside the range
covered by the quadratic Bezier in [0,1]; that is there must exist t in [0,1] such that Bx(t) = _x. If the input
x-coordinate is not inside the range covered by the Bezier curve, the returned array is empty. Otherwise, the
array contains either one, two, or three y-coordinates. There are issues with curves that are exactly or nearly (for
numerical purposes) vertical in which there could theoretically be an infinite number of y-coordinates for a single
x-coordinate. This method does not work in such cases, although compensation might be added in the future.
Each array element is a reference to an |