|
From:
<br...@ph...> - 2006-02-05 01:02:03
|
Mojca Miklavec wrote: > At the very beginning I wanted to ask for an additional function > (polyline), but then I figured out that the Metapost terminal has a > nice workaround for it: it always saves the last point and if the next > line continues in the same point (without changing line type or color > inbetween), it draws a continuous path rather than two separate lines. There's no sane reason for implementing any "workaround" for this --- the terminal driver API already *has* a polyline function. That's why we have two functions, term->move() and term->vect(), instead of a single term->draw_line(from,to). Each term->move() conceptually starts a new polyline, each term->vect() extends it by one leg, any other call but term->vect() ends it. We don't need a term->polyline(). The only thing needed to complete the existing API in this area would be a term->closecycle() or some such, to distinguish between open and closed polylines. |