Package | org.igniterealtime.xiff.data.whiteboard |
Class | public class Path |
Inheritance | Path ![]() ![]() ![]() |
Property | Defined By | ||
---|---|---|---|
fill : Fill [read-only]
The Fill object that contains the properties describing the fill of this
path
| Path | ||
segments : Array [read-only]
The read-only list of start and end points encoded as an array of objects with the
format { from: { x: ###, y: ### }, to: { x: ###, y: ### } }
You should not modify this list. | Path | ||
stroke : Stroke [read-only]
The Stroke object that contains the properties describing the stroke of this
path
| Path | ||
xml : XML [override] | Path |
Method | Defined By | ||
---|---|---|---|
Path(parent:XML = null) | Path | ||
![]() |
Add extension to the list of the given namespace and insert to the XML element as a child. | ExtensionContainer | |
addPoints(from_x:Number, from_y:Number, to_x:Number, to_y:Number):Object
Another interface to add segments to this extension. | Path | ||
addSegment(seg:Object):Object
Adds a start point and end point to this path. | Path | ||
![]() | getAllExtensions():Array | ExtensionContainer | |
![]() | getAllExtensionsByNS(nameSpace:String):Array | ExtensionContainer | |
![]() | getAttribute(name:String):String
Convinience method for getting element value from the XML. | XMLStanza | |
![]() | getChildAttribute(elem:String, name:String):String
Convinience method for getting child element attribute value from the XML. | XMLStanza | |
![]() | getChildField(elem:String, name:String):String
Convinience method for getting child element value from the XML. | XMLStanza | |
![]() | getExtension(elementName:String):IExtension
Get the extension having the given element name. | ExtensionContainer | |
![]() | getField(name:String):String
Convinience method for getting element value from the XML. | XMLStanza | |
![]() | removeAllExtensions(nameSpace:String):void | ExtensionContainer | |
![]() | removeExtension(extension:IExtension):Boolean | ExtensionContainer | |
![]() | removeFields(name:String):void
Helper method for removing all child elements that have the given name. | XMLStanza | |
serialize(parent:XML):Boolean
TODO: make as set xml
Serializes the Path data to XML for sending. | Path | ||
serializeSegments():String
Creates the compact form of the segments
in the fomrmat defined by SVG
Example: M100 200L14 -15 L 125 100L150 200 300 400M10 20L30 40 50 60 z
| Path | ||
![]() | setAttribute(name:String, value:String):void
Convinience method for setting a value to a element in the XML. | XMLStanza | |
![]() | setChildAttribute(elem:String, name:String, value:String):void
Convinience method for setting an attribute for a child element of the XML. | XMLStanza | |
![]() | setChildField(elem:String, name:String, value:String):void
Convinience method for setting a value for a child element of the XML. | XMLStanza | |
![]() | setField(name:String, value:String):void
Convinience method for setting a value to a element in the XML. | XMLStanza | |
![]() | toString():String
Converts the base stanza XML to a string. | XMLStanza |
Constant | Defined By | ||
---|---|---|---|
![]() | DEFAULT_NS : Namespace [static]
Default XML namespace. | XMLStanza | |
ELEMENT_NAME : String = path [static] | Path | ||
![]() | FLASH_NS : Namespace [static]
| XMLStanza | |
![]() | STREAM_NS : Namespace [static]
| XMLStanza |
fill | property |
fill:Fill
[read-only] The Fill object that contains the properties describing the fill of this path
public function get fill():Fill
See also
segments | property |
segments:Array
[read-only] The read-only list of start and end points encoded as an array of objects with the format { from: { x: ###, y: ### }, to: { x: ###, y: ### } } You should not modify this list. Segments should be added with addSegment
public function get segments():Array
See also
stroke | property |
stroke:Stroke
[read-only] The Stroke object that contains the properties describing the stroke of this path
public function get stroke():Stroke
See also
xml | property |
xml:XML
[override] public function get xml():XML
public function set xml(value:XML):void
Path | () | Constructor |
public function Path(parent:XML = null)
Parameters
parent:XML (default = null )
|
addPoints | () | method |
public function addPoints(from_x:Number, from_y:Number, to_x:Number, to_y:Number):Object
Another interface to add segments to this extension. Instead of passing an object, you can pass parameters that will be converted into a segment and passed to addSegment
Parameters
from_x:Number — the start x coordinate
| |
from_y:Number — the start y coordinate
| |
to_x:Number — the destination x coordinate
| |
to_y:Number — the destination y coordinate
|
Object — the segment object created from the parameters with the rounded values
from being modified in addSegment
|
addSegment | () | method |
public function addSegment(seg:Object):Object
Adds a start point and end point to this path. The points will be rounded to the nearest integer to save serialization space. 10.0000001 takes 4 times as much spaces as 10
Parameters
seg:Object — An object containing the properties "from" and "to" which
are objects with the properties "x" and "y". An example would
be { from: { x: 100, y: 200 }, to: { x: 200, y: 300 } }
|
Object — the segment parameter with the rounded values
|
See also
serialize | () | method |
public function serialize(parent:XML):Boolean
TODO: make as set xml Serializes the Path data to XML for sending.
Parameters
parent:XML — The parent node that this extension should be serialized into
|
Boolean — An indicator as to whether serialization was successful
|
serializeSegments | () | method |
public function serializeSegments():String
Creates the compact form of the segments in the fomrmat defined by SVG Example: M100 200L14 -15 L 125 100L150 200 300 400M10 20L30 40 50 60 z
ReturnsString — String containging the compact version
|
ELEMENT_NAME | Constant |
public static const ELEMENT_NAME:String = path