| Package | com.nocircleno.graffiti.tools |
| Class | public final class ShapeTool |
| Inheritance | ShapeTool BitmapTool Object |
| Language Version : | ActionScript 3.0 |
| Runtime Versions : | AIR 1.0, Flash Player 10 - AIR 1.5 |
| Property | Defined By | ||
|---|---|---|---|
| fillAlpha : Number | ShapeTool | ||
| fillColor : int | ShapeTool | ||
![]() | layerType : String [read-only]
Layer Tool Writes to
| BitmapTool | |
![]() | mode : String | BitmapTool | |
![]() | renderType : String [read-only]
Render Type
| BitmapTool | |
| strokeAlpha : Number | ShapeTool | ||
| strokeColor : int | ShapeTool | ||
| strokeWidth : Number | ShapeTool | ||
| type : String
Type of Shape
| ShapeTool | ||
| Method | Defined By | ||
|---|---|---|---|
ShapeTool(strokeWidth:Number = 1, strokeColor:int = 0x000000, fillColor:int = 0xFFFFFF, strokeAlpha:Number = 1, fillAlpha:Number = 1, shapeType:String = null, toolMode:String = null)
The ShapeTool constructor. | ShapeTool | ||
apply(drawingTarget:DisplayObject, point1:Point, point2:Point = null):void
The apply method applies the line to the Sprite object passed
to the method. | ShapeTool | ||
![]() | resetTool():void
The resetTool method will reset the drawing data held by the tool. | BitmapTool | |
| fillAlpha | property |
fillAlpha:Number [read-write] public function get fillAlpha():Number public function set fillAlpha(value:Number):void| fillColor | property |
fillColor:int [read-write] public function get fillColor():int public function set fillColor(value:int):void| strokeAlpha | property |
strokeAlpha:Number [read-write] public function get strokeAlpha():Number public function set strokeAlpha(value:Number):void| strokeColor | property |
strokeColor:int [read-write] public function get strokeColor():int public function set strokeColor(value:int):void| strokeWidth | property |
strokeWidth:Number [read-write] public function get strokeWidth():Number public function set strokeWidth(value:Number):void| type | property |
type:String [read-write] Type of Shape
public function get type():String public function set type(value:String):void| ShapeTool | () | Constructor |
public function ShapeTool(strokeWidth:Number = 1, strokeColor:int = 0x000000, fillColor:int = 0xFFFFFF, strokeAlpha:Number = 1, fillAlpha:Number = 1, shapeType:String = null, toolMode:String = null)
The ShapeTool constructor.
strokeWidth:Number (default = 1) — Stroke width.
| |
strokeColor:int (default = 0x000000) — Stroke Color, pass -1 for NO stroke on Shape.
| |
fillColor:int (default = 0xFFFFFF) — Fill Color, pass -1 for NO fill in Shape.
| |
strokeAlpha:Number (default = 1) — Stroke Alpha, default is 1.
| |
fillAlpha:Number (default = 1) — Fill Alpha, default is 1.
| |
shapeType:String (default = null) — Type of Shape.
| |
toolMode:String (default = null) — Tool mode the Shape will be drawing with.
|
// create a rectangle shape with red stroke width of 2 and no fill
var rectangleShape:Shape = new Shape(2, 0xFF0000, -1, 1, 1, ShapeType.RECTANGLE);
| 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 Shape will draw to.
| |
point1:Point — Starting point to apply Shape.
| |
point2:Point (default = null) — End point to apply Shape.
|