Packagesekati.draw
Classpublic class Curve
InheritanceCurve Inheritance flash.display.Shape
ImplementsITweenableDrawing

Curve provides a Tweenable 3-point curved line which, unlike Bezier does not require a control point.

See also

sekati.draw.Bezier


Public Properties
 PropertyDefined by
  color : uint
Return the color.
Curve
  ex : Number
Return the end x pos.
Curve
  ey : Number
Return the end y pos.
Curve
  sx : Number
Return the start x pos.
Curve
  sy : Number
Return the start y pos.
Curve
  thickness : uint
Return the thickness.
Curve
  tx : Number
Return the thru x pos.
Curve
  ty : Number
Return the thru y pos.
Curve
Protected Properties
 PropertyDefined by
  _alpha : Number
Curve
  _caps : String
Curve
  _color : uint
Curve
  _ex : Number
Curve
  _ey : Number
Curve
  _joints : String
Curve
  _miterLimit : Number
Curve
  _pixelHinting : Boolean
Curve
  _scaleMode : String
Curve
  _sx : Number
Curve
  _sy : Number
Curve
  _thickness : Number
Curve
  _tx : Number
Curve
  _ty : Number
Curve
Public Methods
 MethodDefined by
  
Curve(startX:Number, startY:Number, thruX:Number, thruY:Number, endX:Number, endY:Number, thickness:Number, color:uint, alpha:Number, pixelHinting:Boolean, scaleMode:String, caps:String, joints:String, miterLimit:Number)
Curve Constructor
Curve
  
clear():void
Clear the drawn graphics Shape.
Curve
  
draw():void
Draw in to the graphics Shape.
Curve
  
redraw():void
Clear & draw in to the graphics Shape.
Curve
Public Constants
 ConstantDefined by
  ALPHA : Number = 1
[static]
Curve
  CAPS : String = "square"
[static]
Curve
  COLOR : uint = 0x000000
[static]
Curve
  HINTING : Boolean = true
[static]
Curve
  JOINTS : String = "miter"
[static]
Curve
  MITER_LIMIT : Number = 3
[static]
Curve
  SCALE_MODE : String = "none"
[static]
Curve
  THICKNESS : Number = 1
[static] I know this is BS but compiler bug in mxmlc prevents proper compilation.
Curve
Property detail
_alphaproperty
protected var _alpha:Number
_capsproperty 
protected var _caps:String
_colorproperty 
protected var _color:uint
colorproperty 
color:uint  [read-write]

Return the color.

Implementation
    public function get color():uint
    public function set color(value:uint):void
_exproperty 
protected var _ex:Number
exproperty 
ex:Number  [read-write]

Return the end x pos.

Implementation
    public function get ex():Number
    public function set ex(value:Number):void
_eyproperty 
protected var _ey:Number
eyproperty 
ey:Number  [read-write]

Return the end y pos.

Implementation
    public function get ey():Number
    public function set ey(value:Number):void
_jointsproperty 
protected var _joints:String
_miterLimitproperty 
protected var _miterLimit:Number
_pixelHintingproperty 
protected var _pixelHinting:Boolean
_scaleModeproperty 
protected var _scaleMode:String
_sxproperty 
protected var _sx:Number
sxproperty 
sx:Number  [read-write]

Return the start x pos.

Implementation
    public function get sx():Number
    public function set sx(value:Number):void
_syproperty 
protected var _sy:Number
syproperty 
sy:Number  [read-write]

Return the start y pos.

Implementation
    public function get sy():Number
    public function set sy(value:Number):void
_thicknessproperty 
protected var _thickness:Number
thicknessproperty 
thickness:uint  [read-write]

Return the thickness.

Implementation
    public function get thickness():uint
    public function set thickness(value:uint):void
_txproperty 
protected var _tx:Number
txproperty 
tx:Number  [read-write]

Return the thru x pos.

Implementation
    public function get tx():Number
    public function set tx(value:Number):void
_typroperty 
protected var _ty:Number
typroperty 
ty:Number  [read-write]

Return the thru y pos.

Implementation
    public function get ty():Number
    public function set ty(value:Number):void
Constructor detail
Curve()constructor
public function Curve(startX:Number, startY:Number, thruX:Number, thruY:Number, endX:Number, endY:Number, thickness:Number, color:uint, alpha:Number, pixelHinting:Boolean, scaleMode:String, caps:String, joints:String, miterLimit:Number)

Curve Constructor

Parameters
startX:Number
 
startY:Number
 
thruX:Number
 
thruY:Number
 
endX:Number
 
endY:Number
 
thickness:Number
 
color:uint
 
alpha:Number
 
pixelHinting:Boolean
 
scaleMode:String
 
caps:String
 
joints:String
 
miterLimit:Number

Example
   var curve:Curve = new Curve(0, 0, 50,300, 100, 100, 1, 0xff0000);
   addChild(curve);
   Tweener.addTween(curve, {sx:200,sy:300,tx:100,ty:0,ex:900,ey:500, color:0xff00ff, transition:"easeOutQuint", time:5, onUpdate:renderCurve});
   function renderCurve():void {
    curve.draw();
   }
   

Method detail
clear()method
public function clear():void

Clear the drawn graphics Shape.

draw()method 
public function draw():void

Draw in to the graphics Shape.

redraw()method 
public function redraw():void

Clear & draw in to the graphics Shape.

Constant detail
ALPHAconstant
public static const ALPHA:Number = 1
CAPSconstant 
public static const CAPS:String = "square"
COLORconstant 
public static const COLOR:uint = 0x000000
HINTINGconstant 
public static const HINTING:Boolean = true
JOINTSconstant 
public static const JOINTS:String = "miter"
MITER_LIMITconstant 
public static const MITER_LIMIT:Number = 3
SCALE_MODEconstant 
public static const SCALE_MODE:String = "none"
THICKNESSconstant 
public static const THICKNESS:Number = 1

I know this is BS but compiler bug in mxmlc prevents proper compilation.

See also