On line guide/help
You are on page 15 of the online help. Navigate sequentially through the guide pages or search for a topic of interest to you.
Index Prev. NextLine
Draw a line
Use this command to draw a line between two points
Overview
The line tag is used to draw lines within a defined coordinate area. It supports various line styles, orientations, and visual properties.
Syntax
Line parameters can be specified as attributes (except nested elements) or as nested elements within the tag:
Attribute Syntax
Element Syntax
Parameters
Coordinate parameters (required) that define the print area of the line
<x1>: Starting X coordinate
<y1>: Starting Y coordinate
<x2>: Ending X coordinate
<y2>: Ending Y coordinate
The above parameters can alternatively be indicated in this way (one of the two methods is mandatory):
<x> Initial X coordinate (top/left corner)
<y> Initial Y coordinate (top/left corner)
<width> Width of the drawing area, calculated from the initial X coordinate
<height> Height of the drawing area, calculated from the initial Y coordinate
Parameters that define the appearance of the line (optional).
<orientation> Defines how the line is drawn relative to the specified coordinates. Possible values:
DiagonallyBackward (or DB alias) Diagonal line from top-left corner to bottom-right (default)
DiagonallyForward (or DF alias) Diagonal line from bottom-left corner to top-right
HorizontallyTop (or HT alias) Horizontal line at the top
HorizontallyBottom (or HB alias) Horizontal line at the bottom
VerticallyLeft (or VL alias) Vertical line on the left side
VerticallyRight (or VR alias) Vertical line on the right side
<linewidth> Specifies the thickness of the line (numeric value)
<linecolor> Defines the line color using hexadecimal color codes (e.g., "000000" for black, "00FF00" for green)
<linedash> Creates a dashed line pattern using two comma-separated values:
First value: Length of the dash segment
Second value: Length of the gap between dashes
Format: "dash_length,gap_length" (e.g., "2,4" creates 2-unit dashes with 4-unit gaps)
Creates a black diagonal line from coordinates (15,15) to (45,45) with 0.25 width and a dash pattern of 2-unit dashes with 4-unit gaps.
Example 1: Diagonal Dashed Line (Attribute Style)
Creates a horizontal black dashed line at the top of the defined area with equal 2-unit dashes and gaps.
Example 2: Horizontal Dashed Line
Creates a solid green vertical line on the left side with 0.35 width.
Example 3: Vertical Solid Line (Green)
Creates a solid black vertical line on the right side with 0.25 width.
Example 4: Vertical Solid Line (Black)
- When linedash is omitted, the line will be drawn as a solid line
- Color values should be specified as hexadecimal color codes with or without the "#" prefix
- Coordinate values and line width can be specified as integers or decimal numbers