END_PATH ​
Ends the definition of a the current path.
Syntax ​
END_PATH [ close-figure ] .
Parameters ​
close-figure
(modifier, optional) - When specified then the last point of the path is connected to the first point of the path with a straight line.
Details ​
This ends the definition of a path, after which it can be used to draw a line, a shape (DRAW_PATH
) or a clipping region (CLIP_PATH
). The definition of a path must first be started with BEGIN_PATH
.
The close-figure
modifier can be used to close the path when only drawing only the outline with DRAW_PATH
. The path is automatically closed when it also has to be filled.
Each path can only be used once. To draw or clip 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_PATH
Draw a triangle with using close-figure
.
GRAPHREP
SHADOW off
# Define the path.
BEGIN_PATH
MOVE_TO x:0cm y:0cm
LINE_TO x:1cm y:1cm
LINE_TO x:1cm y:0cm
END_PATH close-figure
# Draw the path.
DRAW_PATH
Draw 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_PATH
Draw 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:stroke
Versions and Changes ​
Available since ADOxx 1.3