OverviewSingleDeprecated

package jsx3.vector

This package and all contained classes are available only when the Charting add-in is enabled.

Class Summary
jsx3.vector.Block
Defines a base class for GUI controls that implement both the cross-platform box profile painting introduced in 3.2 and the cross-platform (VML/SVG) vector painting, also introduced in 3.2.
jsx3.vector.Canvas
Represents a vector canvas in which vector shapes are painted.
jsx3.vector.Fill
Represents a vector fill, the color and gradient that fills a solid vector shape.
jsx3.vector.Group
Represents a grouping of vector shapes.
jsx3.vector.Line
Paints a vector line defined by two end points.
jsx3.vector.LineGroup
A more efficient way of painting many vector lines of the same color and thickness.
jsx3.vector.Oval
Paints a vector oval bounded by the box defined by its left, top, width, and height.
jsx3.vector.Polygon
Paints a vector polygon defined by a set of points.
jsx3.vector.Rectangle
Paints a vector rectangle.
jsx3.vector.RectangleGroup
A more efficient way of painting many vector rectangles of the same fill and stroke.
jsx3.vector.Shape
Represents a vector shape element.
jsx3.vector.Stroke
Represents a vector line style.
jsx3.vector.Tag
The base class for jsx3.vector.Group and jsx3.vector.Shape.
jsx3.vector.TextLine
Renders text along an arbitrary line.
Method Summary
static String
colorAsHtml(color : int | String)
Converts an integer color to a CSS hex string color.
static Number
Converts degrees (0 at North, clockwise) to radians (0 at East, counterclockwise).
static void
paintEventHandler(obj : jsx3.app.Model, strEvtType : String, strMethod : String, objElm : jsx3.vector.Tag)
Renders a cross-platform vector event handler.
static void
updateVector(objNew : jsx3.html.Tag, objExisting : HTMLElement)
Updates a rendered vector HTML element, objExisting, with an in-memory vector tag, objNew.
Method Detail

colorAsHtml

static String colorAsHtml(color : int | String)
Converts an integer color to a CSS hex string color. If the color parameter is not a number, this function returns the argument as a string.

Parameters:

colorThe number to convert to hex.

Returns:

The CSS hex string.  

degreesToRadians

static Number degreesToRadians(degrees : Number)
Converts degrees (0 at North, clockwise) to radians (0 at East, counterclockwise).

Parameters:

degreesa degree value; 0 points North, increasing values go clockwise.

Returns:

a radian value, between 0 and 2*pi; 0 points East, increasing values go counterclockwise.  

paintEventHandler

static void paintEventHandler(obj : jsx3.app.Model, strEvtType : String, strMethod : String, objElm : jsx3.vector.Tag)
Renders a cross-platform vector event handler.

Parameters:

obj
strEvtTypethe event type, one of jsx3.gui.Event.CLICK, etc.
strMethodthe instance method to call on obj when the event is received.
objElmthe HTML element to which to add the event handler.

updateVector

static void updateVector(objNew : jsx3.html.Tag, objExisting : HTMLElement)
Updates a rendered vector HTML element, objExisting, with an in-memory vector tag, objNew. For example,
var objElm = document.getElementById("vectorId");
var objVector = new jsx3.vector.Oval(0, 0, 100, 100);
objVector.setFill(new jsx3.vector.Fill(0xFFFF00));
jsx3.vector.updateVector(objVector, objElm);

Parameters:

objNew
objExisting