Called by
Picture::output()
for writing MetaPost code toout_stream
for aShape
pointed to by a pointer on thevector<Shape*> shapes
belonging to thePicture
. Such aShape
will have been created by a drawing or filling function.
Called in
Picture::output()
. It determines whether aShape
can be output. If it can, and anoutput()
function for the type of theShape
exists, avector<Shape*>
containing a pointer to theShape
is returned.On the other hand, it is possible to define a type derived from
Shape
, without anoutput()
function of its own, and not derived from a type that has one. It may then consist of one or more objects of types that do haveoutput()
functions. In this case, thevector<Shape*>
returned byextract()
will contain pointers to all of these subsidiaryShapes
, andPicture::output()
will treat them as independent objects. In particular, if any one of them cannot be projected using the arguments passed toPicture::output()
, this will have no effect on whether the others are outputted or not.Currently, there are no
Shapes
without anoutput()
function, either belonging to the class, or inherited. However, it's useful to be able to defineShapes
in this way, so that they can be tested without having to define anoutput()
function first.
Sets the values of
projective_extremes
for theShape
. This is needed inPicture::output()
for determining the order in which objects are output.
const
pure virtual functions: real get_minimum_z (void)These functions return the minimum, maximum, and mean z-value respectively of the projected
Points
belonging to theShape
, i.e., fromprojective_extremes
. The values for theShapes
on thePicture
are used for determining the order in which they are output
const
pure virtual function: const valarray<real> get_extremes (void)Returns
projective_extremes
.
Sets
do_output
tofalse
. This function is called inPicture::output()
, if aShape
on aPicture
cannot be output using the arguments passed toPicture::output()
.
Sets
do_output
totrue
. Called inPicture::output()
afteroutput()
is called on theShapes
. This way, output ofShapes
that couldn't be output whenPicture::output()
was called with a particular set of arguments won't necessarily be suppressed whenPicture::output()
is called again with different arguments.
f