Main Page   Class Hierarchy   Compound List   File List   Compound Members  

PLib::MatrixImage Class Template Reference

A basic templated image class. More...

#include <image.h>

Inheritance diagram for PLib::MatrixImage:

PLib::Matrix PLib::Basic2DArray List of all members.

Public Methods

 MatrixImage (void)
 MatrixImage (Matrix< T > &img)
 MatrixImage (MatrixImage< T > &img)
 MatrixImage (const int r, const int c)
 ~MatrixImage ()
void drawLine (int i1, int j1, int i2, int j2, T color)
void drawPoint (int i, int j, double radius, T color)
void store (Matrix< T > &)

Detailed Description

template<class T>
class PLib::MatrixImage< T >

A basic templated image class.

This class allows one to draw a line or a point on a matrix as if it was an image.

Author:
Philippe Lavoie
Date:
4 Oct. 1996

Definition at line 48 of file image.h.


Member Function Documentation

template<class T>
void PLib::MatrixImage< T >::drawLine int    i1,
int    j1,
int    i2,
int    j2,
  color
 

draws a line from point 1 to point 2.

Draws a line without aliasing from point \a (i1,j1) to \a (i2,j2) with the value \a color.

Parameters:
i1  the row of point 1
j1  the column of point 1
i2  the row of point 2
j2  the column of point 2
color  the line is drawn with this value
Author:
Philippe Lavoie
Date:
24 January 1997

Definition at line 58 of file image.cpp.

References PLib::Basic2DArray::cols, PLib::Basic2DArray::operator(), and PLib::Basic2DArray::rows.

Referenced by PLib::NurbsCurve::drawImg.

template<class T>
void PLib::MatrixImage< T >::drawPoint int    i,
int    j,
double    r,
  color
 

draws a point of radius r.

Draws a point of radius r at location (i,j) with the value color.

Parameters:
i  the row of the center point to draw
j  the column of the center point to draw
r  the radius of the point
color  the value to draw the point with
Author:
Philippe Lavoie
Date:
24 January 1997

Definition at line 136 of file image.cpp.

References PLib::Basic2DArray::cols, and PLib::Basic2DArray::operator().

template<class T>
void PLib::MatrixImage< T >::store Matrix< T > &    a
 

copies an image to a Matrix.

copies the image to a matrix of the same type.

Parameters:
a  the matrix to store the image to
Author:
Philippe Lavoie
Date:
24 January 1997

Definition at line 158 of file image.cpp.

References PLib::Basic2DArray::cols, PLib::Basic2DArray::m, and PLib::Basic2DArray::rows.


The documentation for this class was generated from the following files:
Generated on Tue Jun 24 13:26:59 2003 for NURBS++ by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002