Packagecom.degrafa.geometry.segment
Classpublic class QuadraticBezierTo
InheritanceQuadraticBezierTo Inheritance Segment Inheritance DegrafaObject
ImplementsISegment

Defines a quadratic Bézier curve from the current point to (x,y) using (cx,cy) as the control point.

See also

http://www.w3.org/TR/SVG/paths.html#PathDataQuadraticBezierCommands


Public Properties
 PropertyDefined by
  bounds : Rectangle
[read-only] The tight bounds of this segment as represented by a Rectangle object.
QuadraticBezierTo
 InheritedcoordinateType : String
Segment
  cx : Number
The x-coordinate of the control point of the curve.
QuadraticBezierTo
  cy : Number
The y-coordinate of the control point of the curve.
QuadraticBezierTo
  data : String
QuadraticBezierTo short hand data value.
QuadraticBezierTo
 Inheriteddocument : Object
The MXML document that created this object.
DegrafaObject
 InheritedenableEvents : Boolean
Enable events for this object.
DegrafaObject
 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.
Segment
 InheritedisShortSequence : Boolean
Segment
 Inheritedname : String
The name that refers to this object.
DegrafaObject
  segmentType : String
[read-only] Return the segment type
QuadraticBezierTo
 InheritedsuppressEventProcessing : Boolean
Temporarily suppress event processing for this object.
DegrafaObject
  x : Number
The x-coordinate of the end point of the curve.
QuadraticBezierTo
  y : Number
The y-coordinate of the end point of the curve.
QuadraticBezierTo
Protected Properties
 PropertyDefined by
  commandStack : Array
An Array of flash rendering commands that make up this element.
QuadraticBezierTo
 InheritedeventDispatcher : EventDispatcher
EventDispatcher instance for this object.
DegrafaObject
Public Methods
 MethodDefined by
  
QuadraticBezierTo(cx:Number = 0, cy:Number = 0, x:Number = 0, y:Number = 0, data:String = null, coordinateType:String = "absolute", isShortSequence:Boolean = false)
Constructor.
QuadraticBezierTo
 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
  
computeSegment(lastPoint:Point, absRelOffset:Point, lastControlPoint:Point, commandStack:Array):void
Compute the segment adding instructions to the command stack.
QuadraticBezierTo
 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
 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.
QuadraticBezierTo
 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 segment 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 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
cyproperty 
cy:Number  [read-write]

The y-coordinate of the 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
dataproperty 
data:String  [read-write]

QuadraticBezierTo short hand data value.

The quadratic Bézier data property expects exactly 4 values cx, cy, x and y 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

segmentTypeproperty 
segmentType:String  [read-only]

Return the segment type

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

Implementation
    public function get segmentType():String
xproperty 
x: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 x():Number
    public function set x(value:Number):void
yproperty 
y: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 y():Number
    public function set y(value:Number):void
Constructor detail
QuadraticBezierTo()constructor
public function QuadraticBezierTo(cx:Number = 0, cy:Number = 0, x:Number = 0, y:Number = 0, data:String = null, coordinateType:String = "absolute", isShortSequence:Boolean = false)

Constructor.

The QuadraticBezierTo constructor accepts 7 optional arguments that define it's data, properties, coordinate type and a flag that specifies a short sequence.

Parameters
cx:Number (default = 0) — A number indicating the x-coordinate of the control point of the curve.
 
cy:Number (default = 0) — A number indicating the y-coordinate of the control point of the curve.
 
x:Number (default = 0) — A number indicating the x-coordinate of the end point of the curve.
 
y:Number (default = 0) — A number indicating the y-coordinate of the end point of the curve.
 
data:String (default = null) — A string indicating the data to be used for this segment.
 
coordinateType:String (default = "absolute") — A string indicating the coordinate type to be used for this segment.
 
isShortSequence:Boolean (default = false) — A boolean indicating the if this segment is a short segment definition.
Method detail
computeSegment()method
public function computeSegment(lastPoint:Point, absRelOffset:Point, lastControlPoint:Point, commandStack:Array):void

Compute the segment adding instructions to the command stack.

Parameters
lastPoint:Point
 
absRelOffset:Point
 
lastControlPoint:Point
 
commandStack:Array
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.