Factory:org.bzdev.anim2d.AnimationPath2DFactory
Parameter Types
(optional keytype)
(value type)
Range RV Mode Add/Set
color
Line Color
(none) N/A false clear
The color
Clearing this parameter restores the default. Its subparameters determine the color.
color.alpha
Alpha
java.lang.Integer [0, 255] false set
The alpha component of the color (0 for transparent to 255 for opaque)
color.blue
Blue
java.lang.Integer [0, 255] false set
The blue component of the color (0 for none to 255 for the maximum value)
color.css
CSS Color
java.lang.String N/A false set
The CSS specification for the color
This parameter's value provides a color via a string containing a CSS (Cascading Style Sheet) color (level 3). The specification for a CSS color, level 3, can be found in a W3C recommendation, and consists of one of the following:
  • 6 hexadecimal digits following an '#' and providing an opaque color (i.e., the alpha value is 255 in a RGBA color space).
  • rgb(RED,BLUE,GREEN), where RED, BLUE,, and GREEN are either numbers in the range [0, 255] or a number (typically floating point) followed by a '%'.
  • rgba(RED,BLUE,GREEN,ALPHA), where RED, BLUE, and GREEN are either numbers in the range [0, 255] or a number (typically floating point) followed by a '%', and ALPHA varies from 0.0 (fully transparent to 1.0 (opaque).
  • hsl(HUE,SATURATION,LIGHTNESS), where HUE is in the range [0,360], SATURATION is a number in the range [0,100] followed immediately by a '%', and where LIGHTNESS is a number in the range [0,100] followed immediately by a '%'.
  • hsl(HUE,SATURATION,LIGHTNESS, ALPHA), where HUE is in the range [0,360), SATURATION is a number in the range [0,100] followed immediately by a '%', where LIGHTNESS is a number in the range [0,100] followed immediately by a '%', and where ALPHA is a floating point number in the range [0, 1].
  • a keyword denoting an X11 color with the addition of "gray" and its synonym "grey" from SVG 1.0. X11 colors are described in the document X11 color names. The variant of these names that this class uses are the ones given in the W3C recommendation cited above. These are all lower case with no whitespace.
  • the value null, indicating that this parameter is not in use.
The subparameters red, green, blue, and alpha, when not null, will override the corresponding components of the CSS color. If the css, red, green, blue, and alpha parameters are all null, a default color (possibly null) will be used.
color.green
Green
java.lang.Integer [0, 255] false set
The green component of the color (0 for none to 255 for maximum value)
color.red
Red
java.lang.Integer [0, 255] false set
The red component of the color (0 for none to 255 for the maximum value)
cpoint
Control-Point Data
int N/A false add
A table of points along the path
This parameter can be used directly to remove all entries associated with a key or to clear all the keys.

The table consists of a sequence of descriptors, each with a type. Specific subparameters go with each of these types, and only specific sequences are allowed:

  • The first point's type is either MOVE_TO or MOVE_TO_NEXT. Only a single point of this type is allowed.
  • A segment that contains only CONTROL points (0, 1, or 2) after the end of the previous segment must end with a SEG_END, SEG_END_NEXT, or CLOSE point. These represent straight lines, quadratic Bézier curves, and cubic Bézier curves respectively. The control points must be preceded by a point whose type is MOVETO, SEG_END or SEG_END_PREV.
  • An open spline segment starts with either the end of another segment or a point whose type is either MOVE_TO or MOVE_TO_NEXT. An open spline ends with a point whose type is SEG_END or SEG_END_PREV, and contains points (at least one) whose types are either SPLINE or SPLINE_FUNCTION.
  • A closed subpath is indicated by a point whose type is CLOSE. A BasicSplinePathBuilder allows at most one of these points, and no point may follow a point whose type is CLOSE. If this point is preceded by a point of type SEG_END or SEG_END_PREV, a straight line (unless the line will have a length of zero) will connect the previous point to the point specified by the last point whose type is MOVE_TO or MOVE_TO_NEXT. If all the points after the initial point are a sequence of SPLINE or SPLINE_FUNCTION points and that sequence is terminated by a CLOSE point, the point immediately before the sequence must have a type of MOVE_TO or MOVE_TO_NEXT, and a closed spline will be generated consisting of this initial point and the spline points.
cpoint.n
Number of Segments
int
int
[-∞, ∞] false set
Number of segments between points at which functions are evaluated
The value of this parameter is an integer giving the number of segments between the values at which the functions provided by the parameters xf and yf are evaluated. The number of segments is one less than the number of points.
cpoint.t1
Starting Argument
int
double
[-∞, ∞] false set
Starting argument for functions giving the points along a spline
The value of this parameter is an arbitrary real number. The arguments to the functions provided by the xf and yf parameters will vary from the value of the parameter t1 to the value of the parameter t2.
cpoint.t2
Ending Argument
int
double
[-∞, ∞] false set
Ending argument for functions giving the points along a spline
The value of this parameter is an arbitrary real number. The arguments to the functions provided by the xf and yf parameters will vary from the value of the parameter t1 to the value of the parameter t2.
cpoint.type
Path-Entry Type
int
org.bzdev.geom.SplinePathBuilder.CPointType
N/A false set
the type of a path entry - an enumeration constant MOVE_TO, MOVE_TO_NEXT, CONTROL, SPLINE, SPLINE_FUNCTION, SEG_END, SEG_END_PREV, SEG_END_NEXT, or CLOSE defined by SplinePathBuilder.CPointType
The value of this parameter is an enumeration constant defined by the enumeration type org.bzdev.geom.SplinePathBuilder.CPointType:
  • MOVE_TO - Move to point. The entry must include a cpoint.x and a cpoint.y parameter.
  • MOVE_TO_NEXT - Move to a point whose coordinates are given by the next entry, which must be a SPLINE or SPLINE_FUNCTION. If it is a SPLINE_FUNCTION, the value of the function at cpoint.t1 (provided by the SPLINE_FUNCTION entry) will be used to compute the x and y coordinates of this point.
  • CONTROL - A control point for a cubic or quadratic curve. Both the cpoint.x and cpoint.y parameters must be provided. At most 2 CONTROL points may appear in a row, and this subsequence must be terminated by a SEG_END, SEG_END_NEXT, or CLOSE.
  • SPLINE - A point along a spline. Both the cpoint.x and cpoint.y coordinates must be provided.
  • SPLINE_FUNCTION - Functions are used to compute a sequence of spline points. The parameter cpoint.xf, cpoint.yf, cpoint.t1, cpoint.t2, and cpoint.n must be provided.
  • SEG_END - This represents the final point in a straight line, quadratic curve, cubic curve, or spline. Both cpoint.x and cpoint.y parameters must be provided.
  • SEG_END_PREV - This indicates that the final point in a spline is the previous entry, which must have a type of SPLINE or SPLINE_FUNCTION. For the SPLINE_FUNCTION case, the value ofcpoint.t2 for the SPLINE_FUNCTION entry will be used to compute the x an y coordinates coordinates of this point.
  • SEG_END_NEXT - This indicates that the initial point in a spline is the start of the spline. this initial point have a type of SPLINE or SPLINE_FUNCTION. For the SPLINE_FUNCTION case, the value of cpoint.t1 for the SPLINE_FUNCTION entry will be used to compute the x an y coordinates coordinates of this staring point, which also ends the previous segment If the point before a SEG_END_NEXT point is a SEG_END point or a SEG_END or MOVE_TO point, the SEG_END_NEXT will terminate a straight line segment at the coordinates of the next point. If the point before the SEG_END_NEXT point is a SPLINE_FUNCTION or SPLINE point, the previous spline will terminate at the coordinates of the next point and the following spline will start at that point's coordinates.
  • CLOSE - This indicates that the curve is closed. If the curve is a single spline, the spline will be a closed, smooth curve. Otherwise a line, if necessary, will be drawn from the current position to the last MOVE_TO coordinates.
cpoint.x
X Coordinate Component
int
double
[-∞, ∞] false set
The X component of a point in graph-coordinate space units
This parameter is used when the type parameter has the value MOVE_TO, CONTROL, SPLINE, and SEG_END
cpoint.xf
X Function
int
org.bzdev.obnaming.NamedFunctionOps
N/A false set
Function to determine the x coordinate of a point along a spline
The parameter is an object implementing the NamedFunctionOps interface, and returns a value in graph coordinate space units. The argument to the function is a path parameter. Such objects include org.bzdev.devqsim.SimFunction.
cpoint.y
Y Coordinate Component
int
double
[-∞, ∞] false set
The Y component of a point in graph coordinate space units
This parameter is used when the type parameter has the value MOVE_TO, CONTROL, SPLINE, and SEG_END)
cpoint.yf
Y Function
int
org.bzdev.obnaming.NamedFunctionOps
N/A false set
Function to determine the y coordinate of a point along a spline
The parameter is an object implementing the NamedFunctionOps interface, and returns a value in graph coordinate space units. The argument to the function is a path parameter. Such objects include org.bzdev.devqsim.SimFunction.
radius
Radius
double [-∞, ∞] false set
The radius of circles indicating segment end points
The value is expressed in user-space units, with a default value of 5.0. If a path is drawn with abnormally thick lines, a larger radius may be needed. This parameter is used in conjunction with the showSegments parameter. It's primary use is for debugging or testing.
showSegments
Show Segments
boolean N/A false set
A flag indicating if segment end points should be shown
This parameter by default has the value false. Setting it to true is useful in some cases because the end points of segments occur at integral values of the path parameter. The coordinates of these end points are listed in order by the array used to configure the cpoint parameters.
stroke
Line Stroke
(none) N/A false clear
The stroke (a basic stroke)
Clearing this parameter restores the default. Its subparameters determine the stroke's properties.
stroke.cap
Cap
org.bzdev.obnaming.misc.BasicStrokeParm.Cap N/A false set
The type of the line-segment cap
This parameter's value, the type of a line-segment cap, is one of the following enumeration constants defined by the enumeration org.bzdev.obnaming.misc.BasicStrokeParm.Cap:
  • BUTT. Subpaths and dash segments end with no added decoration.
  • ROUND. Subpaths and dash segments end with a round decoration.
  • SQUARE.Subpaths and dash segments end with a square decoration that extends half the line width beyond the end of each subpath or dash segment.
stroke.dashIncrement
Dash Increment
double (0.0, ∞] false set
the length of a '-' or ' ' in a dash pattern
The length is in either user-space units or graph coordinate space units, depending on the value of the parameter gcsMode.
stroke.dashPattern
Dash Pattern
java.lang.String N/A false set
A pattern of alternating "-" and " " sequences
The value of this parameter is a string. If the string has a length of zero, the line is solid. Otherwise the pattern should be represented by a sequence of "-" or " " giving the length of dashes or empty space respectively as multiples of the value of dashIncrement. Each "-" and each " " represents a component of a segment whose length is dashIncrement. Thus, if dashIncrement is 10.0, then the pattern "-- - " will consist of a dash of length 20.0, a space of length 20.0, a dash of length 10.0, and a space of length 10.0, with the pattern repeating as needed. Unless the dash pattern is a string whose length is 0, the pattern must start with a "-" instead of a " ".
stroke.dashPhase
Dash Phase
double [-∞, ∞] false set
the offset to the start of the dashing pattern
stroke.gcsMode
boolean N/A false set
A boolean that indicates whether stroke parameters are provided in graph coordinate space or user space.
The value of this parameter indicates whether the width, dashPhase, and dashIncrement are provided in graph coordinate space or user space. The value true indicates graph coordinate space and the value false (the default) indicates user space.
stroke.join
Join
org.bzdev.obnaming.misc.BasicStrokeParm.Join N/A false set
The method for joining line segments
This parameter's value, the type of the method used to join line segments, is one of the following enumeration constants defined by org.bzdev.obnaming.misc.BasicStrokeParm.Join:
  • BEVEL. Connected path segments are joined by connecting the outer corners of their outlines with a straight line segment.
  • MITER. Connected path segments are joined by extending the outer corners until they meet.
  • ROUND. Connected path segments are joined by rounding off the corner at a radius of half the line width.
stroke.miterLimit
Miter Limit
double [1.0, ∞] false set
the miter limit for a stroke
This parameter's value is the limit such that a line join is trimmed when the ratio of miter length to stroke width is greater than this value. The miter length is the diagonal length of the miter, which is the distance between the inside corner and the outside corner of the intersection. The smaller the angle formed by two line segments, the longer the miter length and the sharper the angle of intersection. The default miterlimit value of 10.0 causes all angles less than 11 degrees to be trimmed. Trimming miters converts the decoration of the line join to bevel. This values applies only to a line join that has a MITER join decoration, and must be larger than or equal to 1.0.
stroke.width
Width
double [-∞, ∞] false set
the line width of a stroke
timeline
Timeline
int N/A false add
Timeline entries (use only to clear)
This is an integer-keyed set of values that define changes in an object's configuration. Subclasses may provide additional timeline parameters.
timeline.time
Time
int
java.lang.Double
[-∞, ∞] false set
The time for a timeline entry
This parameter must be provided if a timeline entry exists. The units are those used by the double-precession time unit for the simulation (for animations, this is generally seconds).
timeline.traceSetMode
TraceSet Mode
int
org.bzdev.devqsim.TraceSetMode
N/A false set
The trace-set mode for a timeline entry
This parameter indicates how the trace sets associated with a timeline entry should be interpreted. The values are an enumeration whose type is org.bzdev.devqsim.TraceSetMode and are used as follows:
  • KEEP - keep the existing trace sets, adding additional ones specified by the parameter timeline.traceSets.
  • REMOVE - remove the trace sets specified by the parameter timeline.traceSets.
  • REPLACE - remove all existing trace sets and replace those with the ones specified by the timeline.traceSets parameter.
timeline.traceSets
Trace Sets
int
org.bzdev.devqsim.TraceSet
N/A false add
The trace sets for a timeline entry
This parameter represents a set of TraceSet objects (the three-argument add method is used to add entries). How the entries are interpreted depends on the trace set mode for this timeline entry.
timeline.visible
Visibility
int
java.lang.Boolean
N/A false set
The visibility for a timeline entry
This parameter's value determines the visibility of an object. When false the object is invisible and when true the object is visible.
timeline.zorder
Z-order
int
java.lang.Long
[-∞, ∞] false set
The z-order for a timeline entry
This parameter's value determines the stacking order of animation objects. Those with smaller values of this parameter are drawn before those with larger values.
traceSets
Trace Sets
org.bzdev.devqsim.TraceSet N/A false add
A set of TraceSet objects, used for tracing
This parameter provides a set of TraceSets a SimObject will use for tracing. One should use the add and remove factory methods as this parameter refers to a set of values.
visible
Visibility
boolean N/A false set
The visibility flag - objects with this set to false are invisible.
windingRule
Winding Rule
org.bzdev.geom.SplinePathBuilder.WindingRule N/A false set
The winding rule (WIND_EVEN_ODD or WIND_NON_ZERO); clearing restores the default
This parameter's value is an enumeration constant defined by the enumeration type org.bzdev.geom.SplinePathBuilder.WindingRule:
  • WIND_EVEN_ODD. With this rule, a point is assumed to be in the interior of a path if a line drawn in any direction from that point to infinity is crossed by path segments an odd number of times.
  • WIND_NON_ZERO. With this rule, a point is assumed to be in the interior of a path if a line drawn in any direction from that point to infinity is crossed by path segments a different number of times in the counter-clockwise direction than the clockwise direction.
These winding rules correspond to the int constants with the same names defined by java.awt.geom.Path2D.
zorder
Z-Order
long [-∞, ∞] false set
The stacking order - objects with lower values are drawn first.