LineDataRep.cxx
Go to the documentation of this file.
1 
12 #include "LineDataRep.h"
13 
15 #include "reps/LinePointRep.h"
16 
17 namespace hippodraw {
18 
20 LineDataRep ( hippodraw::Axes::Type axis, double value )
21 {
22  m_name = "Static Line";
23  m_projector = new LineProjector ( axis, value );
24  m_rep = new LinePointRep ( );
25  // The above deleted in ~DataRep()
26  const Color red ( Color::red );
27 
28  m_rep->setColor ( red );
29 }
30 
33 {
34  m_name = "Static Line";
35 }
36 
38 {
39  return new LineDataRep ( *this );
40 }
41 
42 /* virtual */
44 {
45  return false;
46 }
47 
48 void
50 setValue ( double value )
51 {
52  LineProjector * projector
53  = dynamic_cast < LineProjector * > ( m_projector );
54  projector -> setValue ( value );
55 }
56 
57 bool
60 {
61  return axis == Axes::X || axis == Axes::Y;
62 }
63 
64 } // namespace hippodraw
65 

Generated for HippoDraw Class Library by doxygen