BoxTextRep.cxx
Go to the documentation of this file.
1 
12 #ifdef _MSC_VER
13 // include max() and min() missing from MicroSoft Visual C++
14 #include "msdevstudio/MSconfig.h"
15 #endif //_MSC_VER
16 
17 #include "BoxTextRep.h"
18 
19 #include "pattern/string_convert.h"
20 #include "graphics/ViewBase.h"
22 
23 using std::string;
24 
25 using namespace hippodraw;
26 
28  : TextRepBase ( "Text From Box" )
29 {
30 }
31 
33  : TextRepBase( rep )
34 {
35 }
36 
38 {
39  return new BoxTextRep ( *this );
40 }
41 
44 void
47  ViewBase & view )
48 
49 {
50  if (String::ci_find(m_text, "tex:")==0) {
51  string tex_snippet = m_text.substr(4);
52  view.drawLatex ( tex_snippet );
53  }
54 
55  else {
56  view.drawText ( m_text, 5, 10, m_size, 0, 'l', 't', true, 0, & m_color );
57  }
58 }

Generated for HippoDraw Class Library by doxygen