Package | org.igniterealtime.xiff.data.whiteboard |
Class | public class Path |
Implements | ISerializable |
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 |
Method | Defined by | ||
---|---|---|---|
Path(parent:XMLNode = null)
| Path | ||
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 | ||
deserialize(node:XMLNode):Boolean
Deserializes the Path data.
| Path | ||
serialize(parent:XMLNode):Boolean
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 |
Constant | Defined by | ||
---|---|---|---|
ELEMENT_NAME : String = "path" [static]
| Path |
fill | property |
fill:Fill
[read-only]The Fill object that contains the properties describing the fill of this path
Implementation 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
Implementation 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
Implementation public function get stroke():Stroke
See also
Path | () | constructor |
public function Path(parent:XMLNode = null)
Parameters
parent:XMLNode (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
Parametersfrom_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
Parametersseg: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
deserialize | () | method |
public function deserialize(node:XMLNode):Boolean
Deserializes the Path data.
Parametersnode:XMLNode — The XML node associated this data
|
Boolean — true if deserialization was successful
|
serialize | () | method |
public function serialize(parent:XMLNode):Boolean
Serializes the Path data to XML for sending.
Parametersparent:XMLNode — 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"