org.jivesoftware.xiff.data.whiteboard

class Path

Object | +--org.jivesoftware.xiff.data.whiteboard.Path
Implemented Interfaces: ISerializable

class Path extends Object
A message extension for whitboard exchange. This class is the base class for other extension classes such as Path
  • Author:
    Sean Treadway
  • Since:
    2.0.0

Field Summary

public static ELEMENT: String
Static class variables to be overridden in subclasses;

Property Summary

public fill: Fill (read-only)
The Fill object that contains the properties describing the fill of this path
public 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 stroke: Stroke (read-only)
The Stroke object that contains the properties describing the stroke of this path

Constructor

public Path ( parent: XMLNode)

Method Summary

public 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
public addSegment ( seg ): 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
public deserialize ( node: XMLNode ): Boolean
Deserializes the Path data.
public serialize ( parent: XMLNode ): Boolean
Serializes the Path data to XML for sending.
public 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

Field Documentation


Property Documentation


Constructor Documentation

Path

public function Path (
parent: XMLNode)

    Method Documentation

    deserialize

    public function deserialize (
    node: XMLNode): Boolean
    Deserializes the Path data.

    serialize

    public function serialize (
    parent: XMLNode): Boolean
    Serializes the Path data to XML for sending.

    The documentation was generated from the following file:
    • Path.as, Last Modified: 3/10/2005 10:13:40 PM