There are two versions for each of the drawing functions. The second
one has the Picture argument picture at the beginning of the
argument list, rather than at the end. This is convenient when passing
a picture argument. Where picture is optional, the default
is always current_picture.
const function: void drawdot ([const Color& ddrawdot_color = *Colors::default_color, [const string ppen = "", [Picture& picture = current_picture]]])const function: void drawdot ([Picture& picture = current_picture, [const Color& ddrawdot_color = *Colors::default_color, [const string ppen = "", ]]])Draws a dot on picture. If ppen is specified, a “pen expression” is included in the
drawdotcommand written toout_stream. Otherwise, MetaPost'scurrentpenis used. If ddrawdot_color is specified, the dot will be drawn using thatColor. Otherwise, theColorcurrently pointed to by the pointerColors::default_colorwill be used. This will normally beColors::black. See Color Reference, for more information aboutColorsand thenamespace Colors.Please note that the “dot” will always be parallel to the plane of projection. Even where it appears to be a surface, as in [next figure] , it is never put into perspective, but will always have the same size and shape.
Point P(1, 1); P.drawdot(gray, "pensquare scaled 1cm");
![]()
Fig. 96.
current_picture]])current_picture, [string pen = ""]])Undraws a dot on picture. If ppen is specified, a “pen expression” is included in the
undrawdotcommand written toout_stream. Otherwise, MetaPost'scurrentpenis used.Point P(1, 1); P.drawdot(gray, "pensquare scaled 1cm"); P.undrawdot("pencircle scaled .5cm");
![]()
Fig. 97.
*Colors::default_color, [string ddashed = "", [string ppen = "", [Picture& picture = current_picture, [bool aarrow = false]]]]])current_picture, const Point& p, [const Color& ddraw_color = *Colors::default_color, [string ddashed = "", [string ppen = "", [bool aarrow = false]]]])Draws a line from
*thisto p. Returns thePath *this -- p1. See Path Reference; Drawing and Filling, for more information.Point P(-1, -1, -1); Point Q(2, 3, 5); P.draw(Q, Colors::gray, "", "pensquare scaled .5cm");
![]()
Fig. 98.
current_picture]]])Undraws a line from
*thisto p. Returns thePath *this -- p1. See Path Reference; Drawing and Filling, for more information.Point P(-1, -1, -1); Point Q(2, 3, 5); P.draw(Q, Colors::gray, "", "pensquare scaled .5cm"); P.undraw(Q, "evenly scaled 6", "pencircle scaled .3cm");
![]()
Fig. 99.
Draws a “help line” from
*this top, but only if thestatic Pathdata memberdo_help_linesistrue. See Path Reference; Data Members.“Help lines” are lines that are used when constructing a drawing, but that should not be printed in the final version.
*Colors::default_color, [string ddashed = "", [string ppen = "", [Picture& picture = current_picture]]]])*Colors::default_color, [string ddashed = "", [string ppen = ""]]])Draws an arrow from
*thisto p and returns thePath*this -- p. The second version is convenient for passing aPictureargument without having to specify all of the other arguments.Point P(-3, -2, 1); Point Q(3, 3, 5); P.drawarrow(Q);
![]()
Fig. 100.