The class OrthogonalConnection
creates a polyline that goes from p1 to p2, composed only by horizontal and vertical segments. The shape of the line is controlled by the path parameter.
There are two ways to use this class:
-
p1
andp2
are the start and end points of the line, and path is a string with the characters "-" and "|" indicating the horizontal and vertical segments of the line.For example
"-|-"
will start with a horizontal segment, that will go until the x coordinate intermediate betweenp1
andp2
, then a vertical segment up to the y coordinate ofp2
, and finally a horizontal segment top2
.