Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

fl::CanvasPS Class Reference

#include <canvas.h>

Inheritance diagram for fl::CanvasPS:

fl::Canvas List of all members.

Public Methods

 CanvasPS (const std::string &fileName, float width, float height)
 width and height are in points. They are used to determine %BoundingBox.

virtual ~CanvasPS ()
virtual void drawDone ()
 Do any final steps to output the drawing. After this, the effect of draw commands is undefined.

virtual void drawPoint (const Point &p, unsigned int color=0)
virtual void drawSegment (const Point &a, const Point &b, unsigned int color=0)
virtual void drawPolygon (const std::vector< Point > &points, unsigned int color=0)
virtual void drawCircle (const Point &center, float radius, unsigned int color=0, float startAngle=0, float endAngle=2 *PI)
virtual void drawEllipse (const Point &center, const Matrix2x2< double > &shape, float radius=1, unsigned int color=0, float startAngle=0, float endAngle=2 *PI, bool inverse=false)
 Draws the set ~x * !shape * x == radius^2. shape has same semantics as a covariance matrix. It transforms a circle into an ellipse. radius, startAngle and endAngle are relative to that circle before it is transformed.

virtual void drawImage (const Image &image, Point &p, float width=-1, float height=-1)
 width or height == -1 means size is same number of units as pixels in image

virtual void setTranslation (float x, float y)
 Location of origin in this Canvas' coordinate system.

virtual void setScale (float x, float y)
 Multiply all coordinates by a factor. Scaling is done before translation.

virtual void setLineWidth (float width)
 Width of pen for stroking lines, in native units.

void expandColor (unsigned int color)

Public Attributes

std::ofstream psf
 "Postscript file"

float scale
 Used to compute line widths.

float lineWidth
float bboxT
 Top of bounding box in points.

float bboxB
 Bottom.

float bboxL
 Left.

float bboxR
 Right.


Detailed Description

Outputs drawing as a Postscript file


Constructor & Destructor Documentation

CanvasPS::CanvasPS const std::string &    fileName,
float    width,
float    height
 

width and height are in points. They are used to determine %BoundingBox.

CanvasPS::~CanvasPS   [virtual]
 


Member Function Documentation

void CanvasPS::drawCircle const Point   center,
float    radius,
unsigned int    color = 0,
float    startAngle = 0,
float    endAngle = 2 *PI
[virtual]
 

Reimplemented from fl::Canvas.

void CanvasPS::drawDone   [virtual]
 

Do any final steps to output the drawing. After this, the effect of draw commands is undefined.

Reimplemented from fl::Canvas.

void CanvasPS::drawEllipse const Point   center,
const Matrix2x2< double > &    shape,
float    radius = 1,
unsigned int    color = 0,
float    startAngle = 0,
float    endAngle = 2 *PI,
bool    inverse = false
[virtual]
 

Draws the set ~x * !shape * x == radius^2. shape has same semantics as a covariance matrix. It transforms a circle into an ellipse. radius, startAngle and endAngle are relative to that circle before it is transformed.

Reimplemented from fl::Canvas.

void CanvasPS::drawImage const Image   image,
Point   p,
float    width = -1,
float    height = -1
[virtual]
 

width or height == -1 means size is same number of units as pixels in image

Reimplemented from fl::Canvas.

void CanvasPS::drawPoint const Point   p,
unsigned int    color = 0
[virtual]
 

Reimplemented from fl::Canvas.

void CanvasPS::drawPolygon const std::vector< Point > &    points,
unsigned int    color = 0
[virtual]
 

Reimplemented from fl::Canvas.

void CanvasPS::drawSegment const Point   a,
const Point   b,
unsigned int    color = 0
[virtual]
 

Reimplemented from fl::Canvas.

void CanvasPS::expandColor unsigned int    color [inline]
 

void CanvasPS::setLineWidth float    width [virtual]
 

Width of pen for stroking lines, in native units.

Reimplemented from fl::Canvas.

void CanvasPS::setScale float    x,
float    y
[virtual]
 

Multiply all coordinates by a factor. Scaling is done before translation.

Reimplemented from fl::Canvas.

void CanvasPS::setTranslation float    x,
float    y
[virtual]
 

Location of origin in this Canvas' coordinate system.

Reimplemented from fl::Canvas.


Member Data Documentation

float fl::CanvasPS::bboxB
 

Bottom.

float fl::CanvasPS::bboxL
 

Left.

float fl::CanvasPS::bboxR
 

Right.

float fl::CanvasPS::bboxT
 

Top of bounding box in points.

float fl::CanvasPS::lineWidth
 

std::ofstream fl::CanvasPS::psf
 

"Postscript file"

float fl::CanvasPS::scale
 

Used to compute line widths.


The documentation for this class was generated from the following files:
Generated on Thu Dec 9 17:13:26 2004 for fl by doxygen1.2.18