Packagecom.zavoo.svg.nodes
Classpublic class SVGRoot
InheritanceSVGRoot Inheritance SVGNode Inheritance flash.display.Sprite

Root container of the SVG



Public Properties
 PropertyDefined by
  _elementById : Object
Object to hold node id registration
SVGRoot
  height : Number
return height of SVG
SVGRoot
  loadTime : int
[read-only] Used to synchronize tweens
SVGRoot
  scale : Number
Set scaleX and scaleY at the same time
SVGRoot
 InheritedsvgRoot : SVGRoot
Recursively searches for the root node
SVGNode
  title : String
SVGRoot
  width : Number
return width of SVG
SVGRoot
  xml : XML
[write-only] Set super._xml Create new _elementById object
SVGRoot
Protected Properties
 PropertyDefined by
 Inherited_graphicsCommands : Array
List of graphics commands to draw node.
SVGNode
 Inherited_invalidDisplay : Boolean = false
If true, redraw sprite graphics Set to true on any change to xml
SVGNode
 Inherited_style : Object
Used for caching node attribute style values.
SVGNode
 Inherited_xml : XML
SVG XML for this node
SVGNode
Public Methods
 MethodDefined by
  
SVGRoot(xml:XML = null)
SVGRoot
  
getElement(id:String):*
Retrieve registered node by name
SVGRoot
  
getStyle(name:String):String
Support default SVG style values
SVGRoot
 Inherited
Force a redraw of a node and its children
SVGNode
  
registerElement(id:String, node:*):void
Register a node
SVGRoot
 Inherited
setStyle(name:String, value:String):void
Set node style to new value Updates SVG XML and then calls refreshGraphis()
SVGNode
Protected Methods
 MethodDefined by
  
addRootMask(xVal:Number, yVal:Number, widthVal:Number, heightVal:Number):void
Draw rectangluar mask
SVGRoot
 Inherited
Remove all child nodes
SVGNode
 Inherited
draw():void
Clear current graphics and call runGraphicsCommands to render SVG element
SVGNode
 Inherited
Called to generate AS3 graphics commands from the SVG instructions
SVGNode
 Inherited
getAttribute(attribute:*, defaultValue:* = null):*
SVGNode
 Inherited
loadAttribute(name:String, field:String = null):void
Load an XML attribute into the current node
SVGNode
 Inherited
loadStyle(name:String, field:String = null):void
Load an SVG style into the current node
SVGNode
 Inherited
Called at the start of drawing an SVG element.
SVGNode
 Inherited
nodeEndFill():void
Called at the end of drawing an SVG element
SVGNode
 Inherited
parse():void
Parse the SVG XML.
SVGNode
 Inherited
redrawNode(event:Event):void
Triggers on ENTER_FRAME event Redraws node graphics if _invalidDisplay == true
SVGNode
 Inherited
registerId(event:Event):void
If node has an "id" attribute, register it with the root node
SVGNode
 Inherited
Execute graphics commands contained in var _graphicsCommands
SVGNode
  
Add support for viewBox elements
SVGRoot
 Inherited
setupFilters():void
Add any assigned filters to node
SVGNode
 Inherited
Perform transformations defined by the transform attribute
SVGNode
Public Constants
 ConstantDefined by
 InheritedattributeList : Array
[static]
SVGNode
Property detail
_elementByIdproperty
public var _elementById:Object

Object to hold node id registration

heightproperty 
height:Number  [read-write]

return height of SVG

Implementation
    public function get height():Number
    public function set height(value:Number):void
loadTimeproperty 
loadTime:int  [read-only]

Used to synchronize tweens

Implementation
    public function get loadTime():int
scaleproperty 
scale:Number  [read-write]

Set scaleX and scaleY at the same time

Implementation
    public function get scale():Number
    public function set scale(value:Number):void
titleproperty 
title:String  [read-write]Implementation
    public function get title():String
    public function set title(value:String):void
widthproperty 
width:Number  [read-write]

return width of SVG

Implementation
    public function get width():Number
    public function set width(value:Number):void
xmlproperty 
xml:XML  [write-only]

Set super._xml Create new _elementById object

Implementation
    public function set xml(value:XML):void
Constructor detail
SVGRoot()constructor
public function SVGRoot(xml:XML = null)Parameters
xml:XML (default = null)
Method detail
addRootMask()method
protected function addRootMask(xVal:Number, yVal:Number, widthVal:Number, heightVal:Number):void

Draw rectangluar mask

Parameters
xVal:Number
 
yVal:Number
 
widthVal:Number
 
heightVal:Number
getElement()method 
public function getElement(id:String):*

Retrieve registered node by name

Parameters
id:String — id of node to be retrieved

Returns
* — node registered with id
getStyle()method 
public override function getStyle(name:String):String

Support default SVG style values

Parameters
name:String

Returns
String
registerElement()method 
public function registerElement(id:String, node:*):void

Register a node

Parameters
id:String — id to register node under
 
node:* — node to be registered
setAttributes()method 
protected override function setAttributes():void

Add support for viewBox elements