Initializing help system before first use

svgaddline

Purpose
Add a line or polyline to an object group.
Synopsis
procedure svgaddline(gid: string, x1: real, y1: real, x2: real, y2: real)
procedure svgaddline(x1: real, y1: real, x2: real, y2: real)
procedure svgaddline(gid: string, points: list of integer|real)
procedure svgaddline(points: list of integer|real)
Arguments
gid 
Object group ID.
x1 
The x coordinate of the first point.
y1 
The y coordinate of the first point.
x2 
The x coordinate of the second point.
y2 
The y coordinate of the second point.
points 
A list of points.
Example
The following code draws the outline of a triangle, given the correct aspect ratio of the user graph.
svgaddgroup("t", "triangle", SVG_ORANGE)
svgaddline([-2, -2, 0, 2, 2, -2, -2, -2)])
svgsetgraphviewbox(-5, -5, 10, 10)
If the shape is to be filled (here: using the group color), you need to use polygon drawing instead of a polyline:
svgaddpolygon([-2, -2, 0, 2, 2, -2)])
svgsetstyel(svggetlastobj, SVG_FILL, SVG_CURRENT)
Further information
1. The line connects the two points whose coordinates are given as parameters or the points contained in the specified list in their order of appearance in the list.
2. If no group ID is specified, the line is added to the last group that has been created.
Related topics

© 2001-2025 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.