ShapeSVG

Shape
ShapeSVG

Shape object used in SVG import.

Summary
ShapeSVGShape object used in SVG import.
Public properties
pStart point of shape
ptsArray of objects with p Points and optional c control Points
fillShape fill (default white fill)
strokeShape line style (default black stroke)
Shape object methods
ShapeSVGShapeSVG object Constructor.
generateCodeGenerates and returns AS3 code corresponding to the shape object.
round2Rounds a numeric value to at most 2 digits after the decimal point.

Public properties

p

public var p: Point

Start point of shape

pts

public var pts: Array

Array of objects with p Points and optional c control Points

fill

public var fill: Object

Shape fill (default white fill)

stroke

public var stroke: Object

Shape line style (default black stroke)

Shape object methods

ShapeSVG

public function ShapeSVG(shapeName: String,
shapeP: Point,
shapePts: Array,
shapeRotation: int,
shapeFill: Object,
shapeStroke: Object):void

ShapeSVG object Constructor.

Parameters

shapeNamename of the shape
shapePstart point of shape (with .x and .y properties)
shapePtsarray of objects, each element of which defines one segment (curve or line) of the whole shapeDef object where p is the point to be drawn to and c is the quadratic bezier control point for the segment (null if a line)
shapeRotationrotation of the shape
shapeFillfill of the shape
shapeStrokeline style of the stroke

generateCode

public function generateCode():String

Generates and returns AS3 code corresponding to the shape object.

round2

private function round2(value: Number):String

Rounds a numeric value to at most 2 digits after the decimal point.

public var p: Point
Start point of shape
public var pts: Array
Array of objects with p Points and optional c control Points
public var fill: Object
Shape fill (default white fill)
public var stroke: Object
Shape line style (default black stroke)
public function ShapeSVG(shapeName: String,
shapeP: Point,
shapePts: Array,
shapeRotation: int,
shapeFill: Object,
shapeStroke: Object):void
ShapeSVG object Constructor.
public function generateCode():String
Generates and returns AS3 code corresponding to the shape object.
private function round2(value: Number):String
Rounds a numeric value to at most 2 digits after the decimal point.
Close