52 virtual void DrawPoint(
const xy_coords &coord ) = 0;
62 virtual void DrawLine(
const xy_coords &startCoord,
63 const xy_coords &stopCoord ) = 0;
68 virtual void DrawRect(
const xy_coords &topLeftCoord,
69 const xy_coords &bottomRightCoord ) = 0;
73 virtual void DrawText(
const xy_coords& coords,
84 virtual void DrawArc(
const xy_coords &coords,
86 const double startAngle,
87 const double stopAngle ) = 0;
122 virtual void SetFont(
const string& font,
const double size ) = 0;
127 virtual void Finish() = 0;
172 for (
int i=0; i<(int)
m_graphics.size(); ++i )
208 const double size = 1.0,
243 const double size = 1.0,
279 line(
const xy_coords& startCoords,
280 const xy_coords& stopCoords,
281 const double width = 1.0,
322 rect(
const xy_coords& topLeftCoords,
323 const xy_coords& bottomRightCoords,
358 arc(
const xy_coords & coords,
360 const double startAngle,
361 const double stopAngle,
362 const double width = 1.0,
400 const double fontSize = 12.0,
401 const string& fontName =
"Times-Roman",
402 const double rotAngle = 0.0,
404 bool alignLeft =
false )
487 double border = 0.0 )
521 const xy_coords& stopCoords )
523 m_outstrm <<startCoords.first<<
" "<<startCoords.second<<
" moveto" <<
"\n";
524 m_outstrm <<stopCoords.first<<
" "<<stopCoords.second<<
" lineto" <<
"\n";
539 m_outstrm <<
"("<<chars<<
") newpath" <<
"\n";
540 m_outstrm <<coords.first<<
" "<<coords.second<<
" moveto" <<
"\n";
543 m_outstrm <<
"gsave " << rot_angle <<
" rotate ";
550 m_outstrm <<
"("<<chars<<
") stringwidth pop 2 div neg 0 rmoveto ";
553 m_outstrm <<
"("<<chars<<
") stringwidth pop neg 0 rmoveto ";
560 m_outstrm <<
"0 " << point_size <<
" 0.8 mul neg rmoveto ";
564 m_outstrm <<
"0 " << point_size <<
" 0.4 mul neg rmoveto ";
584 const double startAngle,
585 const double stopAngle )
588 m_outstrm << coords.first <<
" "<<coords.second<<
" "<<radius<<
" "<<startAngle<<
" "
589 << stopAngle<<
" arc"<<
"\n";
597 const xy_coords &bottomRightCoords )
600 m_outstrm << topLeftCoords.first <<
" "<< topLeftCoords.second <<
" moveto" <<
"\n";
601 m_outstrm << bottomRightCoords.first <<
" "<< topLeftCoords.second <<
" lineto" <<
"\n";
602 m_outstrm << bottomRightCoords.first <<
" "<< bottomRightCoords.second <<
" lineto" <<
"\n";
603 m_outstrm << topLeftCoords.first <<
" "<< bottomRightCoords.second <<
" lineto" <<
"\n";
604 m_outstrm << topLeftCoords.first <<
" "<< topLeftCoords.second <<
" lineto" <<
"\n";
619 m_outstrm <<C.
R()<<
" "<<C.
G()<<
" "<<C.
B()<<
" setrgbcolor" <<
"\n";
636 m_outstrm << width <<
" setlinewidth" <<
"\n";
656 m_outstrm <<
"/"<<font<<
" findfont "<<size<<
" scalefont setfont" <<
"\n";
virtual void SetColor(const color &C)=0
double GetFontSize() const
Definition: Whiteboard.h:648
void DisplayOn(display_type *d)
Definition: Whiteboard.h:170
Definition: Whiteboard.h:276
double m_lineWidth
Definition: Whiteboard.h:669
virtual ~ps_display()
Definition: Whiteboard.h:495
Definition: Whiteboard.h:35
void Draw(display_type *d)
Definition: Whiteboard.h:433
color m_color
Definition: Whiteboard.h:668
virtual void DrawText(const xy_coords &coords, const string &chars, double rot_angle, double point_size, const vert_align vAlign, const horiz_align hAlign)=0
virtual ~dpoint()
Definition: Whiteboard.h:265
Definition: Whiteboard.h:40
float B() const
Definition: Color.h:39
Definition: Whiteboard.h:394
horiz_align m_horizAlign
Definition: Whiteboard.h:448
color m_color
Definition: Whiteboard.h:263
virtual ~decorator()
Definition: Whiteboard.h:468
double y_
Definition: Whiteboard.h:261
color m_color
Definition: Whiteboard.h:385
double m_fontSize
Definition: Whiteboard.h:444
void Draw(display_type *d)
Definition: Whiteboard.h:333
line(const xy_coords &startCoords, const xy_coords &stopCoords, const double width=1.0, const color &c=black)
Definition: Whiteboard.h:279
double m_size
Definition: Whiteboard.h:262
Definition: Whiteboard.h:35
Definition: Whiteboard.h:154
float R() const
Definition: Color.h:29
text(const xy_coords &coords, const string &chars, const color &c=black, const double fontSize=12.0, const string &fontName="Times-Roman", const double rotAngle=0.0, bool alignLeft=false)
Definition: Whiteboard.h:397
virtual double GetFontSize() const =0
int size() const
Number of graphics pointers contained.
Definition: Whiteboard.h:186
virtual void DrawArc(const xy_coords &coords, const double radius, const double startAngle, const double stopAngle)=0
The whiteboard namespace.
Definition: Axes.h:10
xy_coords m_coords
Definition: Whiteboard.h:383
graphic()
Definition: Whiteboard.h:139
xy_coords m_coords
Definition: Whiteboard.h:441
virtual void Draw(display_type *d)
Definition: Whiteboard.h:459
graphic * mp_graphic
Definition: Whiteboard.h:465
float G() const
Definition: Color.h:34
void Draw(display_type *d)
Definition: Whiteboard.h:375
void DeletePointers()
Clear all data, deleting all added pointers.
Definition: Whiteboard.h:178
void Finish()
Definition: Whiteboard.h:664
void Draw(display_type *d)
Definition: Whiteboard.h:292
arc(const xy_coords &coords, const double radius, const double startAngle, const double stopAngle, const double width=1.0, const color &c=black)
Definition: Whiteboard.h:358
virtual const color & GetColor() const =0
virtual void SetFont(const string &font, const double size)=0
xy_coords m_bottomRightCoords
Definition: Whiteboard.h:340
double GetWidth() const
Definition: Whiteboard.h:302
ostream & m_outstrm
Definition: Whiteboard.h:667
dpoint(double x, double y, const double size=1.0, const color &c=black)
Definition: Whiteboard.h:241
double m_width
Definition: Whiteboard.h:306
const color black(0, 0, 0)
Definition: Whiteboard.h:136
void DrawText(const xy_coords &coords, const string &chars, double rot_angle, double point_size, const vert_align vAlign, const horiz_align hAlign)
Definition: Whiteboard.h:531
Definition: Whiteboard.h:355
void DrawLine(const xy_coords &startCoords, const xy_coords &stopCoords)
Definition: Whiteboard.h:520
void Draw(display_type *d)
Definition: Whiteboard.h:252
void Add(graphic *g)
Definition: Whiteboard.h:162
ps_display(ostream &ostrm, double horizSize, double vertSize, double border=0.0)
Definition: Whiteboard.h:484
Definition: Whiteboard.h:204
pair< double, double > xy_coords
Definition: Whiteboard.h:30
virtual ~graphic()
Definition: Whiteboard.h:146
double m_fontSize
Definition: Whiteboard.h:671
string m_fontName
Definition: Whiteboard.h:445
void PrintEpsHeader(ostream &out, const float horizSize, const float vertSize, const float border)
Definition: Eps.cc:6
void DrawRect(const xy_coords &topLeftCoords, const xy_coords &bottomRightCoords)
Definition: Whiteboard.h:596
double m_width
Definition: Whiteboard.h:384
virtual ~point()
Definition: Whiteboard.h:229
const color & GetColor() const
Definition: Whiteboard.h:611
virtual double GetLineWidth() const =0
Definition: Whiteboard.h:237
horiz_align
Definition: Whiteboard.h:40
Definition: Whiteboard.h:46
void SetColor(const color &C)
Definition: Whiteboard.h:615
double m_stopAngle
Definition: Whiteboard.h:384
void Draw(display_type *d)
Definition: Whiteboard.h:217
virtual void Draw(display_type *d)=0
whiteboard()
Definition: Whiteboard.h:157
virtual const string & GetFontName() const =0
svec< graphic * > m_graphics
Definition: Whiteboard.h:194
string m_chars
Definition: Whiteboard.h:442
xy_coords StartCoords() const
Definition: Whiteboard.h:300
virtual void SetLineWidth(const double width)=0
decorator(graphic *g)
Definition: Whiteboard.h:457
xy_coords m_topLeftCoords
Definition: Whiteboard.h:340
Definition: Whiteboard.h:319
void Draw(const string &o, double x, double y)
Definition: Plot3D.cc:16
void DrawPoint(const xy_coords &coords)
Definition: Whiteboard.h:500
double x_
Definition: Whiteboard.h:260
virtual ~text()
Definition: Whiteboard.h:428
void SetHorizAlign(const horiz_align a)
Definition: Whiteboard.h:426
void SetVertAlign(const vert_align a)
Definition: Whiteboard.h:421
double m_rotAngle
Definition: Whiteboard.h:446
virtual ~arc()
Definition: Whiteboard.h:387
Definition: Whiteboard.h:454
color m_color
Definition: Whiteboard.h:443
virtual void DrawLine(const xy_coords &startCoord, const xy_coords &stopCoord)=0
virtual void DrawPoint(const xy_coords &coord)=0
color m_color
Definition: Whiteboard.h:307
virtual ~display_type()
Definition: Whiteboard.h:129
double GetLineWidth() const
Definition: Whiteboard.h:627
Definition: Whiteboard.h:476
double m_radius
Definition: Whiteboard.h:384
void DrawArc(const xy_coords &coords, const double radius, const double startAngle, const double stopAngle)
Definition: Whiteboard.h:582
virtual void DrawRect(const xy_coords &topLeftCoord, const xy_coords &bottomRightCoord)=0
void DrawPoint(double x, double y)
Definition: Whiteboard.h:510
void clear()
Definition: Whiteboard.h:190
xy_coords m_coords
Definition: Whiteboard.h:225
Definition: Whiteboard.h:40
color m_color
Definition: Whiteboard.h:341
Definition: Whiteboard.h:40
const string & GetFontName() const
Definition: Whiteboard.h:644
Definition: Whiteboard.h:35
color m_color
Definition: Whiteboard.h:227
point(const xy_coords &coords, const double size=1.0, const color &c=black)
Definition: Whiteboard.h:207
xy_coords m_startCoords
Definition: Whiteboard.h:305
double m_size
Definition: Whiteboard.h:226
string m_fontName
Definition: Whiteboard.h:670
rect(const xy_coords &topLeftCoords, const xy_coords &bottomRightCoords, const color &c=black)
Definition: Whiteboard.h:322
xy_coords StopCoords() const
Definition: Whiteboard.h:301
vert_align
Definition: Whiteboard.h:35
void SetFont(const string &font, const double size)
Definition: Whiteboard.h:651
virtual ~rect()
Definition: Whiteboard.h:343
xy_coords m_stopCoords
Definition: Whiteboard.h:305
void SetLineWidth(const double width)
Definition: Whiteboard.h:632
const color white(1, 1, 1)
virtual ~line()
Definition: Whiteboard.h:309
vert_align m_vertAlign
Definition: Whiteboard.h:447
double m_startAngle
Definition: Whiteboard.h:384