Next: , Previous: Label Reference, Up: Label Reference


20.1 Data Members

— Private variable: Point* pt

A pointer to the Point representing the location of the Label.

— Private variable: bool dot

true if the label should be dotted, otherwise false.

dot will be false, if the label was generated by a call to label() with the “dot” argument false (the default), true, if the label was generated by a call to dotlabel(), or to label() with the “dot” argument true.

— Private variable: string text

The text of the label. text is always put between “btex” and “etex” in the MetaPost code, so that TeX will be used to format the labels. In particular, this means that TeX's math mode can be used. However, double backslashes must be used instead of single backslashes, in order that single backslashes be written to out_stream.

          Point P(1, 1, 2);
          origin.drawarrow(P);
          P.label("$\\vec{P}$");


[Figure 76. Not displayed.]

Fig. 76.

— Private variable: string position

The position of the text with respect to *pt. Valid values are as in MetaPost: “top”, “bot” (bottom), “lft” (left), “rt” (right), “ulft” (upper left), “llft” (lower left), “urt” (upper right), “lrt” (lower right).

— Public static variable: bool DO_LABELS

Enables or disables creation of Labels. If true, label and dotlabel() cause Labels to be created and put onto a Picture. If false, they are not. Note that it is also possible to suppress output of existing Labels when outputting a Picture.