| Package | com.nocircleno.graffiti.tools |
| Class | public class LineTool |
| Inheritance | LineTool Object |
| Implements | ITool |
| Language Version : | ActionScript 3.0 |
| Runtime Versions : | AIR 1.0, Flash Player 10 - AIR 1.5 |
| Property | Defined By | ||
|---|---|---|---|
| alpha : Number | LineTool | ||
| color : uint | LineTool | ||
| lineWidth : Number | LineTool | ||
| mode : String | LineTool | ||
| renderType : String [read-only]
Line Render Mode
| LineTool | ||
| type : String | LineTool | ||
| Method | Defined 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 | ||
resetTool():void
The resetTool method will clear the drawing commands and data. | LineTool | ||
| alpha | property |
alpha:Number [read-write] public function get alpha():Number public function set alpha(value:Number):void| color | property |
color:uint [read-write] public function get color():uint public function set color(value:uint):void| lineWidth | property |
lineWidth:Number [read-write] public function get lineWidth():Number public function set lineWidth(value:Number):void| mode | property |
mode:String [read-write] public function get mode():String public function set mode(value:String):void| renderType | property |
renderType:String [read-only] Line Render Mode
public function get renderType():String| type | property |
type:String [read-write] public function get type():String public function set type(value:String):void| LineTool | () | Constructor |
public function LineTool(lineWidth:Number = 4, lineColor:uint = 0x000000, lineAlpha:Number = 1, lineType:String = null, toolMode:String = null)
The LineTool constructor.
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) |
// create a dotted line of size 8 and the color of red
var dottedLine:Line = new Line(8, 0xFF0000, 1, LineType.DOTTED);
| apply | () | method |
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.
|
| resetTool | () | method |
public function resetTool():void
The resetTool method will clear the drawing commands and data. This is used
by the GraffitiCanvas after the Mouse has been released.