Next: , Previous: Outputting Solids, Up: Solid Reference


34.13 Drawing and Filling

const virtual function: void draw ([const vector<const Color*> v = Colors::default_color_vector, [const string ddashed = "", [const string ppen = "", [Picture& picture = current_picture]]]])

Draws the Solid.

This function allocates a new Solid, makes it a copy of *this, and puts a pointer to the copy onto picture.shapes. The data members of the Shapes belonging to the copy are set appropriately, so that they can be drawn, when Picture::output() is called.

The Colors used for drawing the various Paths, Circles, Ellipses, etc., belonging to the Solid are passed in v. If the Solid contains more Shapes than v contains pointers to Color, the Color pointed to by the last pointer on v is used to draw the remaining Shapes.

Currently, a Solid can only be drawn with a single dash pattern (ddashed), and pen (ppen).

const virtual function: void fill ([const vector<const Color*> v = Colors::default_color_vector, [Picture& picture = current_picture]])

Fills the Solid.

This function allocates a new Solid makes it a copy of *this, and puts a pointer to it onto picture.shapes. The data members of the Shapes belonging to the copy are set appropriately, so that they can be filled, when Picture::output() is called.

The Colors used for filling the various Paths, Circles, Ellipses, etc., belonging to the Solid are passed in v. If the Solid contains more Shapes than v contains pointers to Color, the Color pointed to by the last pointer on v is used to fill the remaining Shapes.

const virtual function: void filldraw ([const vector<const Color*> draw_colors = Colors::default_color_vector, [const vector<const Color*> fill_colors = Colors::background_color_vector, [const string ddashed = "", [const string ppen = "", [Picture& picture = current_picture]]]]])

Filldraws the Solid.

This function allocates a new Solid, makes it a copy of *this, and puts a pointer to it onto picture.shapes. The data members of the Shapes belonging to the copy are set appropriately, so that they can be filldrawn, when Picture::output() is called.

The Colors used for drawing and filling the various Paths, Circles, Ellipses, etc., belonging to the Solid are passed in draw_colors and fill_colors. If the Solid contains more Shapes than draw_colors contains pointers to Color, the Color pointed to by the last pointer on draw_colors is used to draw the remaining Shapes. The same applies to fill_colors.

Currently, a Solid can only be filldrawn with a single dash pattern (ddashed), and pen (ppen).

const virtual function: void undraw ([const string ddashed = "", [const string ppen = "", [Picture& picture = current_picture]]])

Undraws the Solid.

This function allocates a new Solid, makes it a copy of *this, and puts a pointer to it onto picture.shapes. The data members of the Shapes belonging to the copy are set appropriately, so that they can be undrawn, when Picture::output() is called.

A Solid can currently only be undrawn using a single dash pattern (ddashed), and pen (ppen).

const virtual function: void unfill ([Picture& picture = current_picture])

Unfills the Solid.

This function allocates a new Solid makes it a copy of *this, and puts a pointer to it onto picture.shapes. The data members of the Shapes belonging to the copy are set appropriately, so that they can be unfilled, when Picture::output() is called.

const virtual function: void unfilldraw ([const string ddashed = "", [const string ppen = "", [Picture& picture = current_picture]]])
const virtual function: void undraw ([const string ddashed = "", [const string ppen = "", [Picture& picture = current_picture]]])

Unfilldraws the Solid.

This function allocates a new Solid, makes it a copy of *this, and puts a pointer to it onto picture.shapes. The data members of the Shapes belonging to the copy are set appropriately, so that they can be unfilldrawn, when Picture::output() is called.

A Solid can currently only be unfilldrawn using a single dash pattern (ddashed), and pen (ppen).