Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
reps
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
"
21
#include "
projectors/NTupleProjector.h
"
22
23
using
std::string;
24
25
using namespace
hippodraw;
26
27
BoxTextRep::BoxTextRep
( )
28
:
TextRepBase
(
"Text From Box"
)
29
{
30
}
31
32
BoxTextRep::BoxTextRep
(
const
BoxTextRep
& rep )
33
:
TextRepBase
( rep )
34
{
35
}
36
37
RepBase
*
BoxTextRep::clone
()
38
{
39
return
new
BoxTextRep
( *
this
);
40
}
41
44
void
45
BoxTextRep::
46
drawProjectedValues
(
ProjectorBase
&,
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