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

fl::Canvas Class Reference

#include <canvas.h>

Inheritance diagram for fl::Canvas:

fl::CanvasImage fl::CanvasPS List of all members.

Public Methods

virtual ~Canvas ()
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=0xFFFFFF)
virtual void drawSegment (const Point &a, const Point &b, unsigned int color=0xFFFFFF)
virtual void drawLine (const Point &a, const Point &b, unsigned int color=0xFFFFFF)
 Draws a line thru a and b.

virtual void drawLine (float a, float b, float c, unsigned int color=0xFFFFFF)
 Draws the set ax + by + c = 0.

virtual void drawRay (const Point &p, float angle, unsigned int color=0xFFFFFF)
virtual void drawPolygon (const std::vector< Point > &points, unsigned int color=0xFFFFFF)
virtual void drawParallelogram (const Matrix< double > &S, float radius=1.0f, unsigned int color=0xFFFFFF)
 S projects a unit square centered at the origin into the image. radius scales up the unit square.

virtual void drawParallelogram (const PointAffine &p, float radius=1.0f, unsigned int color=0xFFFFFF)
 Determines an S based on the shape and position of p, then calls drawParallelogram (S, ...).

virtual void drawFilledRectangle (const Point &corner0, const Point &corner1, unsigned int colorFill=0xFFFFFF)
virtual void drawCircle (const Point &center, float radius, unsigned int color=0xFFFFFF, float startAngle=0, float endAngle=2 *PI)
virtual void drawEllipse (const Point &center, const Matrix2x2< double > &shape, float radius=1.0f, unsigned int color=0xFFFFFF, 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 drawEllipse (const Matrix< double > &S, float radius=1.0f, unsigned int color=0xFFFFFF)
 S projects a unit circle centered at the origin into the image. radius scales up the unit circle. This is a convenience function for marking affine-adapted patches.

virtual void drawText (const std::string &text, const Point &point, float size=10, float angle=0, unsigned int color=0xFFFFFF)
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.

virtual void setPointSize (float radius)
 Set distance away from position of point that marker may extend.


Detailed Description

An abstract 2D drawing surface.


Constructor & Destructor Documentation

Canvas::~Canvas   [virtual]
 


Member Function Documentation

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

Reimplemented in fl::CanvasPS.

void Canvas::drawDone   [virtual]
 

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

Reimplemented in fl::CanvasPS.

void Canvas::drawEllipse const Matrix< double > &    S,
float    radius = 1.0f,
unsigned int    color = 0xFFFFFF
[virtual]
 

S projects a unit circle centered at the origin into the image. radius scales up the unit circle. This is a convenience function for marking affine-adapted patches.

void Canvas::drawEllipse const Point   center,
const Matrix2x2< double > &    shape,
float    radius = 1.0f,
unsigned int    color = 0xFFFFFF,
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 in fl::CanvasImage, and fl::CanvasPS.

void Canvas::drawFilledRectangle const Point   corner0,
const Point   corner1,
unsigned int    colorFill = 0xFFFFFF
[virtual]
 

Reimplemented in fl::CanvasImage.

void Canvas::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 in fl::CanvasPS.

void Canvas::drawLine float    a,
float    b,
float    c,
unsigned int    color = 0xFFFFFF
[virtual]
 

Draws the set ax + by + c = 0.

Reimplemented in fl::CanvasImage.

void Canvas::drawLine const Point   a,
const Point   b,
unsigned int    color = 0xFFFFFF
[virtual]
 

Draws a line thru a and b.

void Canvas::drawParallelogram const PointAffine   p,
float    radius = 1.0f,
unsigned int    color = 0xFFFFFF
[virtual]
 

Determines an S based on the shape and position of p, then calls drawParallelogram (S, ...).

void Canvas::drawParallelogram const Matrix< double > &    S,
float    radius = 1.0f,
unsigned int    color = 0xFFFFFF
[virtual]
 

S projects a unit square centered at the origin into the image. radius scales up the unit square.

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

Reimplemented in fl::CanvasImage, and fl::CanvasPS.

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

Reimplemented in fl::CanvasImage, and fl::CanvasPS.

void Canvas::drawRay const Point   p,
float    angle,
unsigned int    color = 0xFFFFFF
[virtual]
 

Reimplemented in fl::CanvasImage.

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

Reimplemented in fl::CanvasImage, and fl::CanvasPS.

void Canvas::drawText const std::string &    text,
const Point   point,
float    size = 10,
float    angle = 0,
unsigned int    color = 0xFFFFFF
[virtual]
 

void Canvas::setLineWidth float    width [virtual]
 

Width of pen for stroking lines, in native units.

Reimplemented in fl::CanvasImage, and fl::CanvasPS.

void Canvas::setPointSize float    radius [virtual]
 

Set distance away from position of point that marker may extend.

Reimplemented in fl::CanvasImage.

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

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

Reimplemented in fl::CanvasImage, and fl::CanvasPS.

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

Location of origin in this Canvas' coordinate system.

Reimplemented in fl::CanvasImage, and fl::CanvasPS.


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