ET++: GrLine
Though it is possible to draw directly on a particular Port, ET++ provides a global
"current Port" and a set of interface functions to simplify the drawing interface.
These functions correspond to the public methods in Port, and the functions
call the Port method on the current Port. Thus it is possible to draw a line on
the current Port without knowing what the current is, or the name of the global
current Port, or anything about Ports at all. To draw a line, the application
can call GrLine, shown below, which calls StrokeLine on the current Port (Port::port),
with appropriate pen values.
inline void GrLine(const Point &p1, const Point &p2)
{ Port::port->StrokeLine(Port::port->penink, Port::port->pensize,
Port::port->pencap, p1, p2); }
Back to the graphical layout description
Back to the main ET++ page