line(P(a,b), P(c,d));
triangle(P(a,b), P(c,d), P(e,f));
rect(P(a,b), P(c,d));
Either pair of opposite vertices specifies the rectangle.
swatch(P(a,b), P(c,d)); boldswatch(P(a,b), P(c,d));
swatch(P(a,b), P(c,d));
boldswatch(P(a,b), P(c,d));