Next: , Previous: Path Reference, Up: Path Reference


26.1 Data Members

— Protected variable: bool line_switch

true if the Path was created using the constructor Path(const Point& p0, const Point& p1), directly or indirectly. See Path Reference; Constructors and Setting Functions.

          Point p0;
          Point p1(1, 1);
          Point p2(2, 3);
          Path q0(p0, p1);
          cout << q0.get_line_switch();
          -| 1
          Path q1;
          q1 = q0;
          cout << q1.get_line_switch();
          -| 1
          Path q2 = p0.draw(p1);
          cout << q2.get_line_switch();
          -| 1
          Path q3("..", false, &p1, &p2, &p0, 0);
          cout << q3.get_line_switch();
          -| 0


[Figure 109. Not displayed.]

Fig. 109.

Some Path functions only work on linear Paths, so it's necessary to be able to distinguish them from non-linear ones. The function is_linear() should be enough to ensure that all of these functions work, so I plan to make line_switch obsolete soon. However, at the moment, it's still needed. See Path Reference; Querying.

— Protected variable: bool cycle_switch

true if the Path is cyclical, otherwise false.

— Protected variable: bool on_free_store

true if the Path was dynamically allocated on the free store. Otherwise false. Set to true only in create_new<Path>(), which should be the only way Paths are ever dynamically allocated. See Path Reference; Constructors and Setting Functions.

— Protected variable: bool do_output

Used in Picture::output(). Set to false if the Path isn't projectable using the arguments passed to Picture::output(). See Picture Reference; Outputting.

— Protected variable: signed short fill_draw_value

Set in the drawing and filling functions, and used in Path::output(), to determine what MetaPost code to write to out_stream. See Path Reference; Drawing and Filling, and Path Reference; Outputting.

— Protected variable: const Color* draw_color

Pointer to the Color used if the Path is drawn.

— Protected variable: const Color* fill_color

Pointer to the Color used if the Path is filled.

— Protected variable: string dashed

String written to out_stream for the “dash pattern” in a MetaPost draw or undraw command. If and only if dashed is not the empty string, “dashed <dash pattern>” is written to out_stream.

Dash patterns have no meaning inside 3DLDF; dashed, if non-empty, is written unchanged to out_stream. I may change this in the future.

— Protected variable: string pen

String written to out_stream for the pen to be used in a MetaPost draw, undraw, filldraw, or unfilldraw command. If and only if pen is not the empty string, “withpen <...>” is written to out_stream.

Pens have no meaning inside 3DLDF; pen, if non-empty, is written unchanged to out_stream. I may change this in the future.

— Protected variable: bool arrow

Indicates whether an arrow should be drawn when outputting a Path. Set to true on a Path created on the free store and put onto a Picture by drawarrow().

— Protected variable: valarray<real> projective_extremes

Contains the maxima and minima of the x, y, and z-coordinates of the projections of Points on a Path using a particular Focus. Set in set_extremes() and used in Picture::output() for surface hiding.

— Protected variable: vector<Point*> points

Pointers to the Points on the Path.

— Protected variable: vector<string> connectors

The connectors between the Points on the Path. Connectors are simply strings in 3DLDF, they are written unchanged to out_stream.

— Public static variable: const Color* help_color

Pointer to a const Color, which becomes the default for draw_help(). See Path Reference; Drawing and Filling.

Please note that help_color is a pointer to a const Color, not a const pointer to a Color or a const pointer to a const Color! It's easy to get confused by the syntax for these types of pointers.1

— Public static variable: string help_dash_pattern

The default dash pattern for draw_help().

— Public static variable: bool do_help_lines

true if help lines should be output, otherwise false. If false, a call to draw_help() does not cause a copy of the Path to be created and put onto a Picture. See Path Reference; Drawing and Filling.


Footnotes

[1] Stroustrup, The C++ Programming Language, p. 96.