Packagefrocessing.shape
Classpublic class FShapeSVG
InheritanceFShapeSVG Inheritance FShapeContainer Inheritance AbstractFShape Inheritance CanvasStyleAdapter Inheritance Object
Subclasses FShapeSVGLoader

Simple SVG Shape.

Elements supported.

not supported.

text module, font module, animation module, style module, clip module, mask modlue, filter module, color profile module, event, script, view, a, pattern, marker



Public Properties
 PropertyDefined By
 Inheritedcaps : String
stroke caps.
AbstractFShape
 Inheritedcommands : Array
[override] [read-only] get childs path commannds.
FShapeContainer
 Inheritedfill : ICanvasFill
fill stye object.
AbstractFShape
 InheritedfillAlpha : Number
fill alpha.
AbstractFShape
 InheritedfillColor : uint
fill color.
AbstractFShape
 InheritedfillEnabled : Boolean
fill style enabled.
AbstractFShape
 Inheritedheight : Number
[override] [read-only]
FShapeContainer
 Inheritedjoints : String
stroke joints.
AbstractFShape
 Inheritedleft : Number
[override] [read-only]
FShapeContainer
 Inheritedmatrix : Matrix
transform matrix( not clone ).
AbstractFShape
 InheritedmiterLimit : Number
stroke miterLimit.
AbstractFShape
 Inheritedname : String
shape object name(id).
AbstractFShape
 Inheritedparent : IFShapeContainer
parent shape container.
AbstractFShape
 InheritedpixelHinting : Boolean
stroke pixelHinting
AbstractFShape
 InheritedscaleMode : String
stroke scaleMode.
AbstractFShape
 Inheritedstroke : ICanvasStroke
stroke style object.
AbstractFShape
 InheritedstrokeAlpha : Number
stroke alpha.
AbstractFShape
 InheritedstrokeColor : uint
stroke color.
AbstractFShape
 InheritedstrokeEnabled : Boolean
stroke style enabled.
AbstractFShape
 InheritedstyleEnabled : Boolean
[read-only]
AbstractFShape
 Inheritedthickness : Number
stroke thickness.
AbstractFShape
 Inheritedtop : Number
[override] [read-only]
FShapeContainer
 InheriteduserData : Object
AbstractFShape
 Inheritedvertices : Array
[override] [read-only] get childs path data.
FShapeContainer
 Inheritedviewbox : FViewBox
FShapeContainer
 Inheritedvisible : Boolean
shape visible.
AbstractFShape
 Inheritedwidth : Number
[override] [read-only]
FShapeContainer
Public Methods
 MethodDefined By
  
FShapeSVG(doc:XML, parent:IFShapeContainer = null)
FShapeSVG
 Inherited
add shape object to the container.
FShapeContainer
 Inherited
applyMatrix(mat:Matrix):void
apply matrix( prepend mat to current matrix ).
AbstractFShape
 Inherited
[override]
FShapeContainer
 Inherited
drawGraphics(gc:Graphics):void
[override] the container does not draw anything.
FShapeContainer
 Inherited
[override]
FShapeContainer
 Inherited
findChild(target:String):IFShape
find child by name.
FShapeContainer
  
findSVGRoot(doc:XML):XML
[static] get root SVG Element
FShapeSVG
 Inherited
getChild(target:String):IFShape
get child by name.
FShapeContainer
 Inherited
getChildAt(index:int):IFShape
get child by index.
FShapeContainer
 Inherited
get children number.
FShapeContainer
  
parseCircle(doc:XML, parent:FShapeContainer = null):FShapeCircle
[static] parse circle element.
FShapeSVG
  
parseColor(attr:String):uint
[static] parse color attribute.
FShapeSVG
  
parseDefs(doc:XML, parent:FShapeContainer = null, target:FShapeContainer = null):FShapeContainer
[static] parse defs element.
FShapeSVG
  
[static] parse ellipse element.
FShapeSVG
  
parseGroup(doc:XML, parent:FShapeContainer = null, target:FShapeContainer = null):FShapeContainer
[static] parse g element.
FShapeSVG
  
parseImage(doc:XML, parent:FShapeContainer = null):AbstractFShape
[static] parse image element.
FShapeSVG
  
parseLength(attr:String, defaultValue:Number = 0):Number
[static] parse "length" attribute.
FShapeSVG
  
parseLine(doc:XML, parent:FShapeContainer = null):FShapeLine
[static] parse line element.
FShapeSVG
  
[static] parse linearGradient element.
FShapeSVG
  
parsePath(doc:XML, parent:FShapeContainer = null):FShape
[static] parse path element.
FShapeSVG
  
parsePoints(points:String):Array
[static] parse list of points attribute.
FShapeSVG
  
parsePolygon(doc:XML, parent:FShapeContainer = null):FShape
[static] parse polygon element.
FShapeSVG
  
parsePolyline(doc:XML, parent:FShapeContainer = null):FShape
[static] parse polyline element.
FShapeSVG
  
[static] parse radialGradient element.
FShapeSVG
  
parseRect(doc:XML, parent:FShapeContainer = null):FShapeRect
[static] parse rect element.
FShapeSVG
  
parseSVG(doc:XML, parent:FShapeContainer = null, target:FShapeContainer = null):FShapeContainer
[static] parse svg element.
FShapeSVG
  
parseSymbol(doc:XML, parent:FShapeContainer = null, target:FShapeContainer = null):FShapeContainer
[static] parse symbol element.
FShapeSVG
  
[static] parse transform("transforms-list") attribute.
FShapeSVG
  
parseUse(doc:XML, parent:FShapeContainer = null, target:FShapeContainer = null):FShapeContainer
[static] parse use element.
FShapeSVG
 Inherited
remove shape object from the container.
FShapeContainer
 Inherited
reset transfrom.
AbstractFShape
 Inherited
rotate(angle:Number):void
rotate shape.
AbstractFShape
 Inherited
scale(x:Number, y:Number):void
scale shape.
AbstractFShape
 Inherited
toSprite():Sprite
[override] make Sprite instance including child shapes.
FShapeContainer
 Inherited
translate(x:Number, y:Number):void
translate shape.
AbstractFShape
 Inherited
update shape rectangle.( left, top, width, height )
AbstractFShape
Constructor Detail
FShapeSVG()Constructor
public function FShapeSVG(doc:XML, parent:IFShapeContainer = null)

Parameters
doc:XML — structure or shape xml document.
 
parent:IFShapeContainer (default = null) — parent container
Method Detail
findSVGRoot()method
public static function findSVGRoot(doc:XML):XML

get root SVG Element

Parameters

doc:XML

Returns
XML
parseCircle()method 
public static function parseCircle(doc:XML, parent:FShapeContainer = null):FShapeCircle

parse circle element.

http://www.w3.org/TR/SVG11/shapes.html#CircleElement

Parameters

doc:XML
 
parent:FShapeContainer (default = null)

Returns
FShapeCircle

See also

parseColor()method 
public static function parseColor(attr:String):uint

parse color attribute.

色指定を行う文字列を 24bit color に変換します.

http://www.w3.org/TR/SVG11/types.html#DataTypeColor

http://www.w3.org/TR/SVG11/types.html#ColorKeywords

Parameters

attr:String

Returns
uint

See also

parseDefs()method 
public static function parseDefs(doc:XML, parent:FShapeContainer = null, target:FShapeContainer = null):FShapeContainer

parse defs element.

http://www.w3.org/TR/SVG11/struct.html#Heads

Parameters

doc:XML
 
parent:FShapeContainer (default = null)
 
target:FShapeContainer (default = null)

Returns
FShapeContainer

See also

parseEllipse()method 
public static function parseEllipse(doc:XML, parent:FShapeContainer = null):FShapeEllipse

parse ellipse element.

http://www.w3.org/TR/SVG11/shapes.html#EllipseElement

Parameters

doc:XML
 
parent:FShapeContainer (default = null)

Returns
FShapeEllipse

See also

parseGroup()method 
public static function parseGroup(doc:XML, parent:FShapeContainer = null, target:FShapeContainer = null):FShapeContainer

parse g element.

http://www.w3.org/TR/SVG11/struct.html#Groups

Parameters

doc:XML
 
parent:FShapeContainer (default = null)
 
target:FShapeContainer (default = null)

Returns
FShapeContainer

See also

parseImage()method 
public static function parseImage(doc:XML, parent:FShapeContainer = null):AbstractFShape

parse image element.

http://www.w3.org/TR/SVG11/struct.html#ImageElement

Parameters

doc:XML
 
parent:FShapeContainer (default = null)

Returns
AbstractFShape

See also

parseLength()method 
public static function parseLength(attr:String, defaultValue:Number = 0):Number

parse "length" attribute. "length" is a "number" optionally followed immediately by a unit identifier.

単位付の数値をピクセル値に換算します.換算率はSVG仕様によります.

http://www.w3.org/TR/SVG11/types.html#DataTypeLength

http://www.w3.org/TR/SVG11/coords.html#Units

Parameters

attr:String
 
defaultValue:Number (default = 0)

Returns
Number — pixel value
parseLine()method 
public static function parseLine(doc:XML, parent:FShapeContainer = null):FShapeLine

parse line element.

http://www.w3.org/TR/SVG11/shapes.html#LineElement

Parameters

doc:XML
 
parent:FShapeContainer (default = null)

Returns
FShapeLine

See also

parseLinearGradient()method 
public static function parseLinearGradient(doc:XML):FShapeGradient

parse linearGradient element.

http://www.w3.org/TR/SVG11/pservers.html#LinearGradients

Parameters

doc:XML

Returns
FShapeGradient
parsePath()method 
public static function parsePath(doc:XML, parent:FShapeContainer = null):FShape

parse path element.

http://www.w3.org/TR/SVG11/paths.html

Parameters

doc:XML
 
parent:FShapeContainer (default = null)

Returns
FShape

See also

parsePoints()method 
public static function parsePoints(points:String):Array

parse list of points attribute.

http://www.w3.org/TR/SVG11/shapes.html#PointsBNF

Parameters

points:String

Returns
Array
parsePolygon()method 
public static function parsePolygon(doc:XML, parent:FShapeContainer = null):FShape

parse polygon element.

http://www.w3.org/TR/SVG11/shapes.html#PolygonElement

Parameters

doc:XML
 
parent:FShapeContainer (default = null)

Returns
FShape

See also

parsePolyline()method 
public static function parsePolyline(doc:XML, parent:FShapeContainer = null):FShape

parse polyline element.

http://www.w3.org/TR/SVG11/shapes.html#PolylineElement

Parameters

doc:XML
 
parent:FShapeContainer (default = null)

Returns
FShape

See also

parseRadialGradient()method 
public static function parseRadialGradient(doc:XML):FShapeGradient

parse radialGradient element.

http://www.w3.org/TR/SVG11/pservers.html#RadialGradients

Parameters

doc:XML

Returns
FShapeGradient
parseRect()method 
public static function parseRect(doc:XML, parent:FShapeContainer = null):FShapeRect

parse rect element.

http://www.w3.org/TR/SVG11/shapes.html#RectElement

Parameters

doc:XML
 
parent:FShapeContainer (default = null)

Returns
FShapeRect

See also

parseSVG()method 
public static function parseSVG(doc:XML, parent:FShapeContainer = null, target:FShapeContainer = null):FShapeContainer

parse svg element.

http://www.w3.org/TR/SVG11/struct.html#SVGElement

Parameters

doc:XML
 
parent:FShapeContainer (default = null)
 
target:FShapeContainer (default = null)

Returns
FShapeContainer

See also

parseSymbol()method 
public static function parseSymbol(doc:XML, parent:FShapeContainer = null, target:FShapeContainer = null):FShapeContainer

parse symbol element.

http://www.w3.org/TR/SVG11/struct.html#SymbolElement

Parameters

doc:XML
 
parent:FShapeContainer (default = null)
 
target:FShapeContainer (default = null)

Returns
FShapeContainer

See also

parseTransform()method 
public static function parseTransform(attr:String):FMatrix2D

parse transform("transforms-list") attribute.

transform 属性の値(変換定義のリスト"transforms-list")を、Matrix に変換します.

http://www.w3.org/TR/SVG11/coords.html#TransformAttribute

Parameters

attr:String

Returns
FMatrix2D
parseUse()method 
public static function parseUse(doc:XML, parent:FShapeContainer = null, target:FShapeContainer = null):FShapeContainer

parse use element.

http://www.w3.org/TR/SVG11/struct.html#UseElement

Parameters

doc:XML
 
parent:FShapeContainer (default = null)
 
target:FShapeContainer (default = null)

Returns
FShapeContainer

See also