| Package | graphics.drawing |
| Class | public dynamic class DashLinePen |
| Inheritance | DashLinePen LinePen Pen flash.utils.Proxy |
Example :
import flash.display.StageScaleMode ;
import graphics.LineStyle ;
import graphics.drawing.DashLinePen ;
import graphics.geom.Vector2 ;
stage.scaleMode = StageScaleMode.NO_SCALE ;
stage.align = "" ;
var shape:Shape = new Shape() ;
shape.x = 10 ;
shape.y = 10 ;
var start:Vector2 = new Vector2(0,0) ;
var end:Vector2 = new Vector2(100, 100) ;
var pen:DashLinePen = new DashLinePen( shape , start , end , 4, 6) ;
pen.line = new LineStyle( 2, 0xFFFFFF , 1 , true ) ;
pen.draw() ;
addChild( shape ) ;
| Property | Defined By | ||
|---|---|---|---|
![]() | align : uint
Determinates the align value of the pen. | Pen | |
| DEFAULT_LENGTH : Number = 2 [static]
The default length value of the dashs in the line. | DashLinePen | ||
| DEFAULT_SPACING : Number = 2 [static]
The default spacing value of the dashs in the line. | DashLinePen | ||
![]() | end : Vector2
The end vector object of this line pen. | LinePen | |
![]() | fill : IFillStyle
Determinates the fill style object of the pen. | Pen | |
![]() | graphics : *
Specifies the Graphics object belonging to this Shape object, where vector drawing commands can occur. | Pen | |
| length : Number
(read-write) Determinates the length of a dash in the line. | DashLinePen | ||
![]() | line : ILineStyle
Determinates the line style object of the pen. | Pen | |
| spacing : Number
Determinates the spacing value between two dashs in this line. | DashLinePen | ||
![]() | start : Vector2
The start vector object of this line pen. | LinePen | |
![]() | useClear : Boolean = true
Indicates if the clear() method is invoked at the end of the draw method. | Pen | |
![]() | useEndFill : Boolean = true
Indicates if the endFill() method is invoked at the end of the draw method. | Pen | |
| Method | Defined By | ||
|---|---|---|---|
DashLinePen(graphic:*, start:* = null, end:* = null, length:Number = 2, spacing:Number = 2)
Creates a new DashLinePen instance. | DashLinePen | ||
![]() | BF(... arguments):void
Defines a shortcut reference to used the beginBitmapFill method. | Pen | |
![]() | C(... arguments):void
Defines a shortcut reference to used the curveTo method. | Pen | |
![]() | CL():void
Defines a shortcut reference to used the clear method. | Pen | |
![]() | draw(... args):void [override]
Draws the shape. | LinePen | |
drawShape():void [override]
This method contains the basic drawing shape algorithm. | DashLinePen | ||
![]() | EF():void
Defines a shortcut reference to used the endFill method. | Pen | |
![]() | F(... arguments):void
Defines a shortcut reference to used the beginFill method. | Pen | |
![]() |
Returns the Line reference of this pen. | LinePen | |
![]() | GF(... arguments):void
Defines a shortcut reference to used the beginGradientFill method. | Pen | |
![]() | GS(... arguments):void
Defines a shortcut reference to used the lineGradientStyle method. | Pen | |
![]() | L(... arguments):void
Defines a shortcut reference to used the lineTo method. | Pen | |
![]() | M(... arguments):void
Defines a shortcut reference to used the moveTo method. | Pen | |
![]() | S(... arguments):void
Defines a shortcut reference to used the lineStyle method. | Pen | |
setPen(... args):void [override]
Sets the arc options to defined all values to draw the arc shape in the movieclip reference of this pen. | DashLinePen | ||
| DEFAULT_LENGTH | property |
public static var DEFAULT_LENGTH:Number = 2The default length value of the dashs in the line.
| DEFAULT_SPACING | property |
public static var DEFAULT_SPACING:Number = 2The default spacing value of the dashs in the line.
| length | property |
length:Number(read-write) Determinates the length of a dash in the line.
public function get length():Number public function set length(value:Number):void| spacing | property |
spacing:NumberDeterminates the spacing value between two dashs in this line.
public function get spacing():Number public function set spacing(value:Number):void| DashLinePen | () | Constructor |
public function DashLinePen(graphic:*, start:* = null, end:* = null, length:Number = 2, spacing:Number = 2)Creates a new DashLinePen instance.
Parametersgraphic:* — The Graphics reference to control with this helper. You can passed-in a Shape or Sprite/MovieClip reference in argument.
| |
start:* (default = null) — The vector object to defines the start position of the drawing.
| |
end:* (default = null) — The vector object to defines the end position of the drawing.
| |
length:Number (default = 2) — The length of the dashs.
| |
spacing:Number (default = 2) — The spacing between two dashs.
|
| drawShape | () | method |
override public function drawShape():voidThis method contains the basic drawing shape algorithm.
| setPen | () | method |
override public function setPen(... args):voidSets the arc options to defined all values to draw the arc shape in the movieclip reference of this pen.
Parameters
... args — (optional) The end vector value (flash.geom.Point or graphics.geom.Vector2)
|