Packagecom.nocircleno.graffiti.tools
Classpublic final class LineTool
InheritanceLineTool Inheritance BitmapTool Inheritance Object

Language Version : ActionScript 3.0
Runtime Versions : AIR 1.0, Flash Player 10 - AIR 1.5

LineTool Class allows the user to draw a SOLID, DASHED or DOTTED line on the canvas.



Public Properties
 PropertyDefined By
  alpha : Number
LineTool
  color : uint
LineTool
 InheritedlayerType : String
[read-only] Layer Tool Writes to
BitmapTool
  lineWidth : Number
LineTool
 Inheritedmode : String
BitmapTool
 InheritedrenderType : String
[read-only] Render Type
BitmapTool
  type : String
Type of Line
LineTool
Protected Properties
 PropertyDefined By
 Inheritedcommands : Vector.<int>
BitmapTool
 InheriteddrawingData : Vector.<Number>
BitmapTool
 Inherited_mode : String
BitmapTool
 Inherited_renderType : String
BitmapTool
 Inherited_type : String
BitmapTool
Public Methods
 MethodDefined By
  
LineTool(lineWidth:Number = 4, lineColor:uint = 0x000000, lineAlpha:Number = 1, lineType:String = null, toolMode:String = null)
The LineTool constructor.
LineTool
  
apply(drawingTarget:DisplayObject, point1:Point, point2:Point = null):void
The apply method applies the line to the Sprite object passed to the method.
LineTool
 Inherited
resetTool():void
The resetTool method will reset the drawing data held by the tool.
BitmapTool
Protected Constants
 ConstantDefined By
 InheritedLAYER_TYPE : String = drawingLayer
BitmapTool
Property Detail
alphaproperty
alpha:Number  [read-write]


Implementation
    public function get alpha():Number
    public function set alpha(value:Number):void
colorproperty 
color:uint  [read-write]


Implementation
    public function get color():uint
    public function set color(value:uint):void
lineWidthproperty 
lineWidth:Number  [read-write]


Implementation
    public function get lineWidth():Number
    public function set lineWidth(value:Number):void
typeproperty 
type:String  [read-write]

Type of Line


Implementation
    public function get type():String
    public function set type(value:String):void
Constructor Detail
LineTool()Constructor
public function LineTool(lineWidth:Number = 4, lineColor:uint = 0x000000, lineAlpha:Number = 1, lineType:String = null, toolMode:String = null)

The LineTool constructor.

Parameters
lineWidth:Number (default = 4) — Line width.
 
lineColor:uint (default = 0x000000) — Line Color.
 
lineAlpha:Number (default = 1) — Type of Line.
 
lineType:String (default = null) — Tool mode the Line will be drawing with.
 
toolMode:String (default = null)

Example
The following code creates a Line instance.
        // create a dotted line of size 8 and the color of red
        var dottedLine:Line = new Line(8, 0xFF0000, 1, LineType.DOTTED);
        
Method Detail
apply()method
override public function apply(drawingTarget:DisplayObject, point1:Point, point2:Point = null):void

The apply method applies the line to the Sprite object passed to the method.

Parameters

drawingTarget:DisplayObject — Sprite that the line will draw to.
 
point1:Point — Starting point to apply line.
 
point2:Point (default = null) — End point to apply line.