Whiteboard
An interface and tools for visualizing large and complex datasets
Public Member Functions | Protected Attributes | List of all members
ns_whiteboard::ps_display Class Reference

#include <Whiteboard.h>

Inheritance diagram for ns_whiteboard::ps_display:
ns_whiteboard::display_type

Public Member Functions

 ps_display (ostream &ostrm, double horizSize, double vertSize, double border=0.0)
 
virtual ~ps_display ()
 
void DrawPoint (const xy_coords &coords)
 
void DrawPoint (double x, double y)
 
void DrawLine (const xy_coords &startCoords, const xy_coords &stopCoords)
 
void DrawText (const xy_coords &coords, const string &chars, double rot_angle, double point_size, const vert_align vAlign, const horiz_align hAlign)
 
void DrawArc (const xy_coords &coords, const double radius, const double startAngle, const double stopAngle)
 
void DrawRect (const xy_coords &topLeftCoords, const xy_coords &bottomRightCoords)
 
const colorGetColor () const
 
void SetColor (const color &C)
 
double GetLineWidth () const
 
void SetLineWidth (const double width)
 
const string & GetFontName () const
 
double GetFontSize () const
 
void SetFont (const string &font, const double size)
 
void Finish ()
 
- Public Member Functions inherited from ns_whiteboard::display_type
virtual ~display_type ()
 

Protected Attributes

ostream & m_outstrm
 
color m_color
 
double m_lineWidth
 
string m_fontName
 
double m_fontSize
 

Detailed Description

Class to create EncapsulatePostScript displays. Concrete implementation of the display_type abstract base class.

Constructor & Destructor Documentation

ns_whiteboard::ps_display::ps_display ( ostream &  ostrm,
double  horizSize,
double  vertSize,
double  border = 0.0 
)
inline
Parameters
ostrmoutput stream
horizSizelength of diplay page (pts)
vertSizeheight of display page (pts)
bordersize of border around display page (pts)
virtual ns_whiteboard::ps_display::~ps_display ( )
inlinevirtual

Member Function Documentation

void ns_whiteboard::ps_display::DrawArc ( const xy_coords coords,
const double  radius,
const double  startAngle,
const double  stopAngle 
)
inlinevirtual

Method to create the code to draw an arc in EPS.

Parameters
coordsstarting position of the arc
radiusradius of curvature
startAnglemeasured counterclockwise from positive x-axis (deg)
stopAnglemeasured counterclockwise from positive x-axis (def)

Implements ns_whiteboard::display_type.

void ns_whiteboard::ps_display::DrawLine ( const xy_coords startCoords,
const xy_coords stopCoords 
)
inlinevirtual

Method to generate the code to draw a line in EPS.

Parameters
startCoordsstart position of the line
stopCoordsend position of the line

Implements ns_whiteboard::display_type.

void ns_whiteboard::ps_display::DrawPoint ( const xy_coords coords)
inlinevirtual

Method to generate the code to draw a point in EPS given an xy_coords.

Parameters
coordsx-y coordinates of the point to be drawn

Implements ns_whiteboard::display_type.

void ns_whiteboard::ps_display::DrawPoint ( double  x,
double  y 
)
inlinevirtual

Method to generate the code to draw a point in EPS given the (x,y) coordinates separately.

Parameters
xx-coordinate of the point
yy-coordinate of the point

Implements ns_whiteboard::display_type.

void ns_whiteboard::ps_display::DrawRect ( const xy_coords topLeftCoords,
const xy_coords bottomRightCoords 
)
inlinevirtual

Method to create the code to draw a rectangle in EPS.

Parameters
topLeftCoordsx-y coordinate of the top left corner of the rectangle
bottomRightCoordsx-y coordinate of the bottom right corner of the rectangle

Implements ns_whiteboard::display_type.

void ns_whiteboard::ps_display::DrawText ( const xy_coords coords,
const string &  chars,
double  rot_angle,
double  point_size,
const vert_align  vAlign,
const horiz_align  hAlign 
)
inlinevirtual

Method to generate the code to draw text in EPS.

Parameters
coordsleft-most x-y coordinate of the text to display
charstext to display
rot_anglerotation angle of text measured counterclockwise from horizontal and given in degrees
vAlignvertical alignment of text
hAlignhorizontal alignment of text

Implements ns_whiteboard::display_type.

void ns_whiteboard::ps_display::Finish ( )
inlinevirtual

Method to flush the output stream when finished drawing objects.

Implements ns_whiteboard::display_type.

const color& ns_whiteboard::ps_display::GetColor ( ) const
inlinevirtual

Method to get the color of the display.

Implements ns_whiteboard::display_type.

const string& ns_whiteboard::ps_display::GetFontName ( ) const
inlinevirtual

Method to get the font name.

Implements ns_whiteboard::display_type.

double ns_whiteboard::ps_display::GetFontSize ( ) const
inlinevirtual

Method to get the font size.

Implements ns_whiteboard::display_type.

double ns_whiteboard::ps_display::GetLineWidth ( ) const
inlinevirtual

Method to get the line width of the display.

Implements ns_whiteboard::display_type.

void ns_whiteboard::ps_display::SetColor ( const color C)
inlinevirtual

Method to set the color of the display.

Parameters
Ccolor of the display

Implements ns_whiteboard::display_type.

void ns_whiteboard::ps_display::SetFont ( const string &  font,
const double  size 
)
inlinevirtual

Method to set the name and size of the font.

Parameters
fontfont type
sizefont size

Implements ns_whiteboard::display_type.

void ns_whiteboard::ps_display::SetLineWidth ( const double  width)
inlinevirtual

Method to set the line width of the display

Parameters
widthline width (pts)

Implements ns_whiteboard::display_type.

Member Data Documentation

color ns_whiteboard::ps_display::m_color
protected
string ns_whiteboard::ps_display::m_fontName
protected
double ns_whiteboard::ps_display::m_fontSize
protected
double ns_whiteboard::ps_display::m_lineWidth
protected
ostream& ns_whiteboard::ps_display::m_outstrm
protected

The documentation for this class was generated from the following file: