| Package | com.degrafa.geometry |
| Class | public class AdvancedQuadraticBezier |
| Inheritance | AdvancedQuadraticBezier QuadraticBezier Geometry DegrafaObject |
| Method | Defined by | ||
|---|---|---|---|
|
AdvancedQuadraticBezier(x0:Number, y0:Number, cx:Number, cy:Number, x1:Number, y1:Number)
Constructor.
| AdvancedQuadraticBezier | ||
![]() |
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.
| QuadraticBezier | |
![]() |
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.
| QuadraticBezier | |
![]() |
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):Number
interpolate
Compute control points so that quadratic Bezier passes through three points at the specified parameter value. | AdvancedQuadraticBezier | ||
|
join(_x:Number, _y:Number, _tension:Number = 1):AdvancedQuadraticBezier
join
Given the current | AdvancedQuadraticBezier | ||
![]() |
pointAt(t:Number):Point
Returns the point at t(0-1) on this object.
| Geometry | |
|
preDraw():void
Performs any pre calculation that is required to successfully render
this element.
| AdvancedQuadraticBezier | ||
![]() |
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. | AdvancedQuadraticBezier | ||
|
tAtMaxY():Number
tAtMaxY
Find t-parameter at which the y-coordinate is a maximum. | AdvancedQuadraticBezier | ||
|
tAtMinX():Number
tAtMinX
Find t-parameter at which the x-coordinate is a minimum. | AdvancedQuadraticBezier | ||
|
tAtMinY():Number
tAtMinY
Find t-parameter at which the y-coordinate is a minimum. | AdvancedQuadraticBezier | ||
![]() |
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. | AdvancedQuadraticBezier | ||
|
yAtX(_x:Number):Array
yAtX
Return the set of y-coordinates corresponding to the input x-coordinate. | AdvancedQuadraticBezier | ||
| AdvancedQuadraticBezier | () | constructor |
public function AdvancedQuadraticBezier(x0:Number, y0:Number, cx:Number, cy:Number, x1:Number, y1:Number)Constructor.
The advanced quadratic Bézier constructor accepts 6 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 control x-axis coordinate.
|
|
cy:Number — A number indicating the 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):Numberinterpolate
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.
|
Number — Number the parameter value in [0,1] at which the Bezier curve passes through the second control point (determined by a chord-length parameterization).
A negative value is returned if less than three interpolation points are provided.
|
| join | () | method |
public function join(_x:Number, _y:Number, _tension:Number = 1):AdvancedQuadraticBezierjoin
Given the current AdvancedQuadraticBezier and an arbitrary point, return a new AdvancedQuadraticBezier instance so that the new quadratic
Bezier interpolates the input point and matches tangent with the current quadratic Bezier at its origin. In other words, given the current (x0,y0), (cx,cy), and (x1,y1),
return a new AdvancedQuadraticBezier with parameters (w0,u0), (zx,zy), and (w1,u1) so that w0 = x1, u0 = y1, and the segment from (cx,cy) to (x1,y1) and
(w0,u0) to (zx,zy) have the same slope. This is one prelude to a more general quadratic spline.
_x:Number — x-coordinate of final interpolation point of output quadratic Bezier.
|
|
_y:Number — y-coordinate of final interpolation point of output quadratic Bezier.
|
|
_tension:Number (default = 1) — - tension parameter between 0 and 1. 0 produces a near linear curve while 1 produces a curve whose control point is the projection of (_x,_y),
onto the vector from (cx,cy) to (x1,y1), unless that point is less than one third the distance from (cx,cy) to (x1,y1). This may be broken into two parameters in
the future for more control. Values outside the interval [0,1] are clipped to either 0 or 1.
|
AdvancedQuadraticBezier —
AdvancedQuadraticBezier reference to quadratic Bezier that can be considered an 'add on' curve to the current quadratic bezier with matching
tangents at the join (x1,y1).
|
| 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 quadratic 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 quadratic 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 qudratic 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 quadratic 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 or two 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 or two 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 |