Node: Path Data Members, Next: , Previous: Path Reference, Up: Path Reference



Data Members

bool line_switch Protected variable
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.

bool cycle_switch Protected variable
true if the Path is cyclical, otherwise false.

bool on_free_store Protected variable
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.

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

signed short fill_draw_value Protected variable
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.

const Color* draw_color Protected variable
Pointer to the Color used if the Path is drawn.

const Color* fill_color Protected variable
Pointer to the Color used if the Path is filled.

string dashed Protected variable
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.

string pen Protected variable
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.

bool arrow Protected variable
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().

valarray<real> projective_extremes Protected variable
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.

vector<Point*> points Protected variable
Pointers to the Points on the Path.

vector<string> connectors Protected variable
The connectors between the Points on the Path. Connectors are simply strings in 3DLDF, they are written unchanged to out_stream.

const Color* help_color Public static variable
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

string help_dash_pattern Public static variable
The default dash pattern for draw_help().

bool do_help_lines Public static variable
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.