| Package | com.nocircleno.graffiti.tools |
| Class | public class Shape |
| Inheritance | Shape Object |
| Implements | ITool |
| Property | Defined By | ||
|---|---|---|---|
| fillColor : int | Shape | ||
| mode : String | Shape | ||
| renderType : String [read-only]
Shape Render Mode
| Shape | ||
| strokeColor : int | Shape | ||
| strokeWidth : Number | Shape | ||
| type : String | Shape | ||
| Method | Defined By | ||
|---|---|---|---|
Shape(strokeWidth:Number = 1, strokeColor:int = 0x000000, fillColor:int = 0xFFFFFF, shapeType:String = null, toolMode:String = null)
The Shape constructor. | Shape | ||
apply(drawingTarget:DisplayObject, point1:Point, point2:Point = null):void
The apply method applies the line to the Sprite object passed
to the method. | Shape | ||
| fillColor | property |
fillColor:int [read-write] public function get fillColor():int public function set fillColor(value:int):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] Shape Render Mode
public function get renderType():String| 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] public function get type():String public function set type(value:String):void| Shape | () | Constructor |
public function Shape(strokeWidth:Number = 1, strokeColor:int = 0x000000, fillColor:int = 0xFFFFFF, shapeType:String = null, toolMode:String = null)
The Shape 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.
| |
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, ShapeType.RECTANGLE);
| 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 Shape will draw to.
| |
point1:Point — Starting point to apply Shape.
| |
point2:Point (default = null) — End point to apply Shape.
|