Packagecom.degrafa.geometry
Classpublic class CubicBezier
InheritanceCubicBezier Inheritance Geometry Inheritance DegrafaObject
ImplementsIGeometry

The CubicBezier element draws a cubic Bézier using the specified start point, end point and 2 control points.

See also

http://degrafa.com/samples/CubicBezier_Element.html


Public Properties
 PropertyDefined by
 InheritedautoClearGraphicsTarget : Boolean
When using a graphicsTarget and if this property is set to true the draw phase will clear the graphics context before drawing.
Geometry
  bounds : Rectangle
[read-only] The tight bounds of this element as represented by a Rectangle object.
CubicBezier
  cx : Number
The x-coordinate of the first control point of the curve.
CubicBezier
  cx1 : Number
The x-coordinate of the second control point of the curve.
CubicBezier
  cy : Number
The y-coordinate of the first control point of the curve.
CubicBezier
  cy1 : Number
The y-coordinate of the second control point of the curve.
CubicBezier
  data : String
CubicBezier short hand data value.
CubicBezier
  derive : CubicBezier
[write-only] An object to derive this objects properties from.
CubicBezier
 Inheriteddocument : Object
The MXML document that created this object.
DegrafaObject
 InheritedenableEvents : Boolean
Enable events for this object.
DegrafaObject
 Inheritedfill : IGraphicsFill
Defines the fill object that will be used for rendering this geometry object.
Geometry
 Inheritedgeometry : Array
A array of IGeometryComposition objects.
Geometry
 InheritedgeometryCollection : GeometryCollection
Access to the Degrafa geometry collection object for this geometry object.
Geometry
 InheritedgraphicsTarget : Array
One or more display object's that this Geometry is to be drawn to.
Geometry
 InheritedgraphicsTargetCollection : DisplayObjectCollection
Access to the Degrafa target collection object for this geometry object.
Geometry
 InheritedhasEventManager : Boolean
Tests to see if a EventDispatcher instance has been created for this object.
DegrafaObject
 Inheritedid : String
The identifier used by document to refer to this object.
DegrafaObject
 Inheritedinvalidated : Boolean
Specifies whether this object is to be re calculated on the next cycle.
Geometry
 Inheritedname : String
The name that refers to this object.
DegrafaObject
 Inheritedstate : String
The state at which to draw this object
Geometry
 InheritedstateEvent : String
The state event at which to draw this object
Geometry
 Inheritedstroke : IGraphicsStroke
Defines the stroke object that will be used for rendering this geometry object.
Geometry
 InheritedsuppressEventProcessing : Boolean
Temporarily suppress event processing for this object.
DegrafaObject
  x : Number
The x-coordinate of the start point of the curve.
CubicBezier
  x1 : Number
The x-coordinate of the end point of the curve.
CubicBezier
  y : Number
The y-coordinate of the start point of the curve.
CubicBezier
  y1 : Number
The y-coordinate of the end point of the curve.
CubicBezier
Protected Properties
 PropertyDefined by
  commandStack : Array
An Array of flash rendering commands that make up this element.
CubicBezier
 InheritedeventDispatcher : EventDispatcher
EventDispatcher instance for this object.
DegrafaObject
Public Methods
 MethodDefined by
  
CubicBezier(x:Number, y:Number, cx:Number, cy:Number, cx1:Number, cy1:Number, x1:Number, y1:Number)
Constructor.
CubicBezier
 Inherited
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registers an event listener object with an EventDispatcher object so that the listener receives notification of an event.
DegrafaObject
 Inherited
dispatchEvent(evt:Event):Boolean
Dispatches an event into the event flow.
DegrafaObject
 Inherited
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
 Inherited
endDraw(graphics:Graphics):void
Ends the draw phase for geometry objects.
Geometry
 Inherited
hasEventListener(type:String):Boolean
Checks whether the EventDispatcher object has any listeners registered for a specific type of event.
DegrafaObject
 Inherited
initChange(property:String, oldValue:Object, newValue:Object, source:Object):void
Helper function for dispatching property changes
DegrafaObject
 Inherited
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
  
preDraw():void
Performs any pre calculation that is required to successfully render this element.
CubicBezier
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Removes a listener from the EventDispatcher object.
DegrafaObject
 Inherited
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
Events
 EventSummaryDefined by
 Inherited  DegrafaObject
 Inherited  DegrafaObject
Property detail
boundsproperty
bounds:Rectangle  [read-only]

The tight bounds of this element as represented by a Rectangle object.

This property can be used as the source for data binding.

Implementation
    public function get bounds():Rectangle
commandStackproperty 
protected var commandStack:Array

An Array of flash rendering commands that make up this element.

cxproperty 
cx:Number  [read-write]

The x-coordinate of the first control point of the curve. If not specified a default value of 0 is used.

This property can be used as the source for data binding.

Implementation
    public function get cx():Number
    public function set cx(value:Number):void
cx1property 
cx1:Number  [read-write]

The x-coordinate of the second control point of the curve. If not specified a default value of 0 is used.

This property can be used as the source for data binding.

Implementation
    public function get cx1():Number
    public function set cx1(value:Number):void
cyproperty 
cy:Number  [read-write]

The y-coordinate of the first control point of the curve. If not specified a default value of 0 is used.

This property can be used as the source for data binding.

Implementation
    public function get cy():Number
    public function set cy(value:Number):void
cy1property 
cy1:Number  [read-write]

The y-coordinate of the second control point of the curve. If not specified a default value of 0 is used.

This property can be used as the source for data binding.

Implementation
    public function get cy1():Number
    public function set cy1(value:Number):void
dataproperty 
data:String  [read-write]

CubicBezier short hand data value.

The cubic Bézier data property expects exactly 8 values x, y, cx, cy, cx1, cy1, x1 and y1 separated by spaces.

This property can be used as the source for data binding.

Implementation
    public function get data():String
    public function set data(value:String):void

See also

deriveproperty 
derive:CubicBezier  [write-only]

An object to derive this objects properties from. When specified this object will derive it's unspecified properties from the passed object.

This property can be used as the source for data binding.

Implementation
    public function set derive(value:CubicBezier):void
xproperty 
x:Number  [read-write]

The x-coordinate of the start point of the curve. If not specified a default value of 0 is used.

This property can be used as the source for data binding.

Implementation
    public function get x():Number
    public function set x(value:Number):void
x1property 
x1:Number  [read-write]

The x-coordinate of the end point of the curve. If not specified a default value of 0 is used.

This property can be used as the source for data binding.

Implementation
    public function get x1():Number
    public function set x1(value:Number):void
yproperty 
y:Number  [read-write]

The y-coordinate of the start point of the curve. If not specified a default value of 0 is used.

This property can be used as the source for data binding.

Implementation
    public function get y():Number
    public function set y(value:Number):void
y1property 
y1:Number  [read-write]

The y-coordinate of the end point of the curve. If not specified a default value of 0 is used.

This property can be used as the source for data binding.

Implementation
    public function get y1():Number
    public function set y1(value:Number):void
Constructor detail
CubicBezier()constructor
public function CubicBezier(x:Number, y:Number, cx:Number, cy:Number, cx1:Number, cy1:Number, x1:Number, y1:Number)

Constructor.

The cubic Bézier constructor accepts 8 optional arguments that define it's start, end and controls points.

Parameters
x:Number — A number indicating the starting x-axis coordinate.
 
y: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.
Method detail
draw()method
public override function draw(graphics:Graphics, rc:Rectangle):void

Begins the draw phase for geometry objects. All geometry objects override this to do their specific rendering.

Parameters
graphics:Graphics — The current context to draw to.
 
rc:Rectangle — A Rectangle object used for fill bounds.
preDraw()method 
public override function preDraw():void

Performs 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.