BEGIN_PATH ​
Starts the definition of a new path.
Syntax ​
BEGIN_PATH .Parameters ​
none
Details ​
This starts the definition of a new path, which can then be used to draw a line, a shape (DRAW_PATH) or a clipping region (CLIP_PATH). The path is defined by the other path commands MOVE_TO, LINE_TO and BEZIER_TO that follow it. These specify the points of the path and how that should be connected to each other. The path definition ends by using the END_PATH command.
After this command it is necessary to first use a MOVE_TO command to specify the point where the path starts. Otherwise the path would start at an undefined point which leads to graphical errors.
No other drawing or clipping commands should be used after a BEGIN_PATH until the END_PATH is used, as they can mess up the path. Other drawing commands can be used after the path definition has ended (with END_PATH) and before the path is actually used (by DRAW_PATH or CLIP_PATH).
Each path can only be used once. To draw or clip agn on the same path again it is necessary to define the path once more.
See Also ​
Examples ​
Draw a simple diagonal line with a thickness of 3pt.
GRAPHREP
SHADOW off
# Define the path.
BEGIN_PATH
MOVE_TO x:0cm y:0cm
LINE_TO x:1cm y:1cm
END_PATH
# Draw the path.
PEN w:3pt
DRAW_PATHDraw a blue document symbol with an exaggerated wavy line at the bottom using a dashed line.
GRAPHREP
# Note: SHADOW is on by default.
# Define the path.
BEGIN_PATH
MOVE_TO x:-1cm y:-1cm
LINE_TO x:-1cm y:0cm
BEZIER_TO 3
x1:-0.25cm y1:-1cm x2:0.5cm y2:2.5cm x3:1cm y3:0cm
LINE_TO x:1cm y:-1cm
END_PATH
# Draw the path as a shape.
PEN style:dash
FILL color:"lightblue"
DRAW_PATHDraw two vertical lines that are connected at the bottom with an exaggerated wavy line.
GRAPHREP
# Note: SHADOW is on by default.
# Define the path.
BEGIN_PATH
MOVE_TO x:-1cm y:-1cm
LINE_TO x:-1cm y:0cm
BEZIER_TO {-0.25cm, -1cm, 0.5cm, 2.5cm, 1cm, 0cm}
LINE_TO x:1cm y:-1cm
END_PATH
# Draw the path only as an outline.
PEN w:3pt
DRAW_PATH mode:strokeVersions and Changes ​
Available since ADOxx 1.3