Skip to content

MIDDLE ​

Specifies to draw all further commands at the middle point of a relation. Only used for relations.

Syntax ​

leo-grammar
MIDDLE .

Parameters ​

none

Details ​

The MIDDLE command specifies to draw all following commands for the graphical representation at the middle point of a relation. In this case the (0cm, 0cm) coordinate takes the place of a movable middle point of the relation. The user can move this point back and forth along the relation as desired. The movable middle point is only available when something is drawn at it.

See Also ​

Examples ​

Draw a connector with a triangle below the middle point.
A connector with a triangle below the middle point

leo
GRAPHREP
SHADOW off

PEN color:"black"
EDGE

MIDDLE
FILL color:"white"
POLYGON 3 x1:-0.2cm y1:0.5cm x2:0cm y2:0cm x3:0.2cm y3:0.5cm

Draw a connector with a thicker lightblue line and which starts with a wavy line and ends with an arrow-head after a short gap. Draw a movable rectangle at the middle point.
Lightblue edge with arrow-head

leo
GRAPHREP start-trans:-0.3cm end-trans:-0.5cm
# Note: SHADOW is on by default.

# Draw the basic edge line.
PEN color:"lightblue" w:0.08cm
EDGE

# Draw the wavy line at the start.
START
POLYLINE 4
    x1:0cm y1:0cm
    x2:-0.1cm y2:0.18cm
    x3:-0.2cm y3:-0.18cm
    x4:-0.3cm y4:0cm

# Draw the arrow-head at the end.
END
POLYLINE 3
    x1:-0.4cm y1:0.15cm
    x2:0cm y2:0cm
    x3:-0.4cm y3:-0.15cm

# Draw the rectangle at the middle.
MIDDLE
FILL color:"lightblue"
RECTANGLE y:-0.3cm w:0.3cm h:0.6cm

Versions and Changes ​

Available since ADOxx 1.3