Node:Point Drawing Functions, Next:Labelling Points, Previous:Point Intersections, Up:Point Reference
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
.
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 = "", ]]])
|
const function |
Draws a dot on picture. If ppen is specified, a "pen
expression" is included in the drawdot command written to
out_stream . Otherwise, MetaPost's currentpen is used.
If ddrawdot_color is specified, the dot will be drawn using that
Color . Otherwise, the Color currently pointed to by the pointer
Colors::default_color will be used. This will normally be
Colors::black . See Color Reference, for more information
about Colors and the namespace 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");
|
void undrawdot ([string pen = "", [Picture& picture = current_picture ]])
|
Function |
void undrawdot ([Picture& picture = current_picture , [string pen = ""]])
|
Function |
Undraws a dot on picture. If ppen is specified, a "pen
expression" is included in the undrawdot command written to
out_stream . Otherwise, MetaPost's currentpen is used.
Point P(1, 1); P.drawdot(gray, "pensquare scaled 1cm"); P.undrawdot("pencircle scaled .5cm");
|
void draw (const Point& p, [const Color& ddraw_color = *Colors::default_color , [string ddashed = "", [string ppen = "", [Picture& picture = current_picture , [bool aarrow = false ]]]]])
|
Function |
void draw (Picture& picture = current_picture , const Point& p, [const Color& ddraw_color = *Colors::default_color , [string ddashed = "", [string ppen = "", [bool aarrow = false ]]]])
|
Function |
Draws a line from *this to p.
Returns the Path *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");
|
void undraw (const Point& p, [string ddashed = "", [string ppen = "", [Picture& picture = current_picture ]]])
|
Function |
void undraw (Picture& picture, const Point& p, [string ddashed = "", [string ppen = ""]]) | Function |
Undraws a line from *this to p.
Returns the Path *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");
|
Path draw_help (const Point& p, [const Color& ddraw_color = *Colors::help_color, [string ddashed = "", [string ppen = "", [Picture& picture = current_picture]]]]) | Function |
Path draw_help (Picture& picture, const Point& p, [const Color& ddraw_color = *Colors::help_color, [string ddashed = "", [string ppen = ""]]]) | Function |
Draws a "help line" from *this to p , but only if the
static Path data member do_help_lines is true .
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. |
Path drawarrow (const Point& p, [const Color& ddraw_color = *Colors::default_color , [string ddashed = "", [string ppen = "", [Picture& picture = current_picture ]]]])
|
Function |
Path drawarrow (Picture& picture, const Point& p, [const Color& ddraw_color = *Colors::default_color , [string ddashed = "", [string ppen = ""]]])
|
Function |
Draws an arrow from *this to p and returns
the Path *this -- p .
The second version is convenient for passing a Picture argument
without having to specify all of the other arguments.
Point P(-3, -2, 1); Point Q(3, 3, 5); P.drawarrow(Q);
|