libpgplotxx.a (C++ interface to PGPLOT)

◆ print()

Ttext & pgplot::Ttext::print ( basic_device dev,
const char *  txt,
const bool &  nl = false,
const float &  sep = 0.025 
)

print text.

Parameters
devdevice to write to
txttext to write
nlcarriage return after string if true
sepseparation to next string in same line

Definition at line 440 of file xpgplotxx.cc.

References advance(), Mangle, Mbbox, Merase, Mjust, Mxref, Myref, pgplot::basic_device::poly(), pgplot::basic_device::ptxt(), pgplot::basic_device::qtxt(), pgplot::basic_device::save(), pgplot::basic_device::sci(), pgplot::basic_device::sfs(), and pgplot::basic_device::unsa().

442  {
443  float xbox[4], ybox[4];
444  // get bounding box
445  dev.qtxt(Mxref, Myref, Mangle, Mjust, txt, xbox, ybox);
446  // erase txet if requested
447  if (Merase)
448  {
449  dev.save();
450  dev.sfs(1);
451  dev.sci(0);
452  dev.poly(4, xbox, ybox);
453  dev.unsa();
454  }
455  // store bounding box
456  Mbbox=Tbbox(xbox, ybox);
457  // print text
458  dev.ptxt(Mxref, Myref, Mangle, Mjust, txt);
459 
460  this->advance(xbox, ybox, nl, sep);
461  return(*this);
462  } // Ttext::print
Tbbox Mbbox
place to store bounding box of print function
Definition: xpgplotxx.h:605
void advance(const float *xbox, const float *ybox, const bool &nl, const float &sep)
advance to new reference position
Definition: xpgplotxx.cc:466
float Mangle
Definition: xpgplotxx.h:602
float Mjust
parameters to pgptxt
Definition: xpgplotxx.h:602
float Myref
text reference position
Definition: xpgplotxx.h:601
bool Merase
erase box prior to plotting text
Definition: xpgplotxx.h:606
Here is the call graph for this function: