class %ZEN.SVGComponent.sprite
extends svgComponent
Base class for SVG sprites.
A sprite is a shape that can be placed on an svgCanvas
and connected to other sprites. Sprites form the basis of
an svg-based graphical editor.
property caption
as %ZEN.Datatype.caption;
Text displayed in center of the sprite.
property ports
as list of port(XMLPROJECTION="ELEMENT",XMLTYPECONSTRAINT="CHOICE");
List of input/output ports.
Each port is the terminator of a connection to another sprite.
property rx
as %ZEN.Datatype.integer(MINVAL=0) [ InitialExpression = 0 ];
Radius of sprite corners.
property style
as %ZEN.Datatype.svgStyle;
Additional style to apply to the primary sprite shape.
method createPort(type, x, y)
[ Language = javascript ]
Create a port for this sprite.
method createPorts()
[ Language = javascript ]
Create the set of ports for this sprite.
method getPort(portno)
[ Language = javascript ]
Get the specificied port by port number (0-based).
method renderContents()
[ Language = javascript ]
Render the inner SVG contents of this sprite.
method setPositionHandler()
[ Language = javascript ]
Notification that this component has been moved.
method setProperty(property, value, value2)
[ Language = javascript ]
Set the value of a named property.
method setSizeHandler()
[ Language = javascript ]
Notification that this component has been resized.
method updateConnectors()
[ Language = javascript ]
Internal method: update position of all connectors
attached to this sprite.