CVR-Lib last update 20 Sep 2009

cvr::drawBase< T > Class Template Reference

Abstract parent class for draw and epsDraw. More...

#include <cvrDrawBase.h>

Inheritance diagram for cvr::drawBase< T >:

Inheritance graph
[legend]
Collaboration diagram for cvr::drawBase< T >:

Collaboration graph
[legend]

List of all members.

Public Types

enum  eMarkerType {
  Pixel = 0, Circle, Xmark, Plus,
  Star, Square, Diamond, TriangleUp,
  TriangleDown, TriangleLeft, TriangleRight, Dot
}

Public Member Functions

 drawBase ()
 drawBase (const drawBase &other)
virtual ~drawBase ()
drawBasecopy (const drawBase &other)
virtual const std::string & name () const
virtual void setGray (const float k)=0
virtual void setMarkerSize (int size)
virtual void setColor (const char *color)=0
virtual void setColor (const T &color)=0
virtual void setStyle (const char *style)
virtual void setMarkerType (eMarkerType m)
virtual ipoint getCanvasSize ()=0
virtual void set (int x, int y)=0
virtual void set (const ipoint &p)
virtual void set (const ipointList &c, const ipoint &offset=ipoint(0, 0))
virtual void set (const location &loc, bool showAngleLine=false)
virtual void set (const rectLocation &loc, bool showAngleLine=false)
virtual void set (const affineLocation &loc, bool approximateEllipse=false, bool showAngleLine=false)
virtual void set (const list< location > &locs, bool showAngleLine=false)
virtual void set (const list< affineLocation > &locs, bool approximateEllipse=false, bool showAngleLine=false)
virtual void marker (int x, int y)
virtual void marker (int x, int y, int width)
virtual void marker (int x, int y, const char *style)
virtual void marker (int x, int y, eMarkerType t)
virtual void marker (int x, int y, int w, const char *style)
virtual void marker (int x, int y, int w, eMarkerType t)
virtual void marker (const ipoint &p)
virtual void marker (const ipoint &p, int width)
virtual void marker (const ipoint &p, const char *style)
virtual void marker (const ipoint &p, eMarkerType t)
virtual void marker (const ipoint &p, int width, eMarkerType t)
virtual void marker (const ipoint &p, int width, const char *style)
virtual void marker (const ipointList &c, const ipoint &offset=ipoint(0, 0))
virtual void marker (const ipointList &c, int width, const ipoint &offset=ipoint(0, 0))
virtual void marker (const ipointList &c, const char *style, const ipoint &offset=ipoint(0, 0))
virtual void marker (const ipointList &c, eMarkerType t, const ipoint &offset=ipoint(0, 0))
virtual void marker (const ipointList &c, int width, const char *style, const ipoint &offset=ipoint(0, 0))
virtual void marker (const ipointList &c, int width, eMarkerType t, const ipoint &offset=ipoint(0, 0))
virtual void line (int fx, int fy, int tx, int ty)=0
virtual void line (const ipoint &p1, const ipoint &p2)
virtual void lineTo (int x, int y)=0
virtual void lineTo (const ipoint &p)
virtual void moveTo (int x, int y)=0
virtual void moveTo (const ipoint &p)
virtual void verticalLine (int x, int y1, int y2)=0
virtual void horizontalLine (int x1, int x2, int y)=0
virtual void verticalLine (const ipoint &p1, const ipoint &p2)
virtual void horizontalLine (const ipoint &p1, const ipoint &p2)
virtual void polarLine (const ipoint &p, const float &length, const float &angle)
virtual void grid (const ipoint &delta, bool interval)=0
virtual void rectangle (int x1, int y1, int x2, int y2, bool filled=false)=0
virtual void rectangle (const ipoint &upperLeft, const ipoint &bottomRight, bool filled=false)
virtual void rectangle (const cvr::rectangle< int > &r, bool filled=false)
virtual void polygon (const ipolygonPoints &poly, bool filled=false, const float angle=0.0f, const ipoint &shift=ipoint(0, 0))=0
virtual void circle (const ipoint &p1, int r, bool filled=false)=0
virtual void ellipse (const ipoint &p1, int aX, int aY, bool filled=false)=0
virtual void ellipse (const ipoint &p1, int aX, int aY, const float &angle, bool filled=false)=0
virtual void arc (const ipoint &p1, const ipoint &pA, const ipoint &pB)=0
virtual void arrow (int fx, int fy, int tx, int ty, const float &size=0.2f)=0
virtual void arrow (const ipoint &p1, const ipoint &p2, const float &size=0.2f)
virtual void text (const std::string txt, int x, int y)=0
virtual void text (const std::string txt, const ipoint &p)
virtual void number (int num, int x, int y)=0
virtual void number (int num, const ipoint &p)

Protected Attributes

int actX_
int actY_
eMarkerType actSymbol_
int actSize_
bool filled_
bool useLinePattern_
bool useFillPattern_


Detailed Description

template<class T>
class cvr::drawBase< T >

Abstract parent class for draw and epsDraw.

This class provides all methods that are implemented in cvrDraw and cvrEpsDraw. It makes a base class availabel with all generall drawing methods. Some special methods, are not implemented in this base class. The class is aiming at providing a base class, so that, according to the given parameter, a picture is drawn or an eps file written.


Member Enumeration Documentation

template<class T>
enum cvr::drawBase::eMarkerType

Specifies different types of marker which can be defined for the marker-method.

See also:
setMarkerType, setStyle
Enumerator:
Pixel  Pixel ('.

')

Circle  Circle ('o').
Xmark  Xmark ('x').
Plus  Plus ('+').
Star  Star ('*').
Square  Square ('s').
Diamond  Diamond ('d').
TriangleUp  Triangle up ('^').
TriangleDown  Triangle down ('v').
TriangleLeft  Triangle left ('<').
TriangleRight  Triangle right ('>').
Dot  Dot ('#').


Constructor & Destructor Documentation

template<class T>
cvr::drawBase< T >::drawBase (  ) 

default constructor

template<class T>
cvr::drawBase< T >::drawBase ( const drawBase< T > &  other  ) 

copy constructor

Parameters:
other the object to be copied

template<class T>
virtual cvr::drawBase< T >::~drawBase (  )  [virtual]

destructor


Member Function Documentation

template<class T>
virtual void cvr::drawBase< T >::arc ( const ipoint p1,
const ipoint pA,
const ipoint pB 
) [pure virtual]

Draw an arc from 'pA' to 'pB', clockwise around center 'p1'.

Parameters:
p1 center of the arc.
pA initial point
pB final point

Implemented in cvr::draw< T >.

template<class T>
virtual void cvr::drawBase< T >::arrow ( const ipoint p1,
const ipoint p2,
const float &  size = 0.2f 
) [inline, virtual]

Draw an arrow.

arrow tip will be at p2. If size<1.0 then tipsize will be the relative portion of arrow length. If size>1.0 then tipsize will be (int)size, independent of arrow length.

Parameters:
p1 initial point.
p2 coordinate of the initial point.
size size of the arrow

Reimplemented in cvr::draw< T >.

template<class T>
virtual void cvr::drawBase< T >::arrow ( int  fx,
int  fy,
int  tx,
int  ty,
const float &  size = 0.2f 
) [pure virtual]

Draw an arrow.

arrow tip will be at (tx, ty). If size<1.0 then tipsize will be the relative portion of arrow length. If size>1.0 then tipsize will be (int)size, independent of arrow length.

Parameters:
fx x coordinate of the initial point.
fy y coordinate of the initial point.
tx x coordinate of the final point.
ty y coordinate of the final point.
size size of the arrow

Implemented in cvr::draw< T >.

template<class T>
virtual void cvr::drawBase< T >::circle ( const ipoint p1,
int  r,
bool  filled = false 
) [pure virtual]

Draw a circle with circle center 'p1' and radius 'r'.

Parameters:
p1 center of the circle
r radius of the circle
filled if true circle is filled

Implemented in cvr::draw< T >.

template<class T>
drawBase& cvr::drawBase< T >::copy ( const drawBase< T > &  other  ) 

copy data of "other" functor.

Parameters:
other the functor to be copied
Returns:
a reference to this functor object

template<class T>
virtual void cvr::drawBase< T >::ellipse ( const ipoint p1,
int  aX,
int  aY,
const float &  angle,
bool  filled = false 
) [pure virtual]

Draw an ellipse with center 'p1' and main axes 'aX' and 'aY'.

The ellipse is turned by the given angle.

Parameters:
p1 center of ellipse
aX radius of ellipse in the first main direction
aY radius of ellipse in the second main direction
angle angle between first main direction and x axis. Must be given in radians (rad=deg/180*Pi).
filled if true, the ellipse is filled

Implemented in cvr::draw< T >.

template<class T>
virtual void cvr::drawBase< T >::ellipse ( const ipoint p1,
int  aX,
int  aY,
bool  filled = false 
) [pure virtual]

Draw an ellipse with center 'p1' and main axes 'aX' and 'aY'.

Implemented in cvr::draw< T >.

template<class T>
virtual ipoint cvr::drawBase< T >::getCanvasSize (  )  [pure virtual]

returns the size of the drawing area.

Implemented in cvr::draw< T >.

template<class T>
virtual void cvr::drawBase< T >::grid ( const ipoint delta,
bool  interval 
) [pure virtual]

Draws a grid in the image.

The interpretation of delta depends on the value of interval.

If interval is true, the values are taken as number of pixels between two grid lines in x and y direction. Otherwise, it is used as number of grid lines.

Warning:
This method is not yet implemented in epsDraw!
Parameters:
delta Number of pixels between lines or number of lines in the image.
interval if true then delta means distance between lines, otherwise it means number of lines.

Implemented in cvr::draw< T >.

template<class T>
virtual void cvr::drawBase< T >::horizontalLine ( const ipoint p1,
const ipoint p2 
) [inline, virtual]

Draws a horizontal line from (p1.x, p1.y) to (p2.x, p1.y).

Parameters:
p1 position of the initial point
p2 provides only the end x position of the line.

Reimplemented in cvr::draw< T >.

template<class T>
virtual void cvr::drawBase< T >::horizontalLine ( int  x1,
int  x2,
int  y 
) [pure virtual]

Draws a horizontal line from (x1, y) to (x2, y).

Parameters:
x1 x component of the initial point.
x2 x component of the final point.
y y component of the line.

Implemented in cvr::draw< T >.

template<class T>
virtual void cvr::drawBase< T >::line ( const ipoint p1,
const ipoint p2 
) [inline, virtual]

Draws a line from the point p to point p2.

See also:
line(int, int, int, int)
Parameters:
p1 the initial point.
p2 the initial point.

Reimplemented in cvr::draw< T >.

template<class T>
virtual void cvr::drawBase< T >::line ( int  fx,
int  fy,
int  tx,
int  ty 
) [pure virtual]

Draws a line from the point (fx, fy) to point (tx, ty).

The "last point" will be defined with the last "set", "line" or "lineTo" method.

Parameters:
fx x component of the initial point.
fy y component of the initial point.
tx x component of the initial point.
ty y component of the initial point.

Implemented in cvr::draw< T >.

template<class T>
virtual void cvr::drawBase< T >::lineTo ( const ipoint p  )  [inline, virtual]

Draw a line from the last point to point p.

See also:
lineTo(int, int)
Parameters:
p initial point.

Reimplemented in cvr::draw< T >.

template<class T>
virtual void cvr::drawBase< T >::lineTo ( int  x,
int  y 
) [pure virtual]

Draws a line from the last point to point (x, y).

The "last point" will be defined with the last "set", "point", "line" or "lineTo" method.

Parameters:
x x component of the initial point.
y y component of the initial point.

Implemented in cvr::draw< T >.

template<class T>
virtual void cvr::drawBase< T >::marker ( const ipointList c,
int  width,
eMarkerType  t,
const ipoint offset = ipoint(0, 0) 
) [virtual]

Sets given marker types at all positions in the c, moved by offset, with given width.

Parameters:
c list of points to put markers on.
width width of the marker
t marker type
offset offset to be added to all points in the previous list.
See also:
marker(int, int)

template<class T>
virtual void cvr::drawBase< T >::marker ( const ipointList c,
int  width,
const char *  style,
const ipoint offset = ipoint(0, 0) 
) [virtual]

Sets markers at all positions in the c, moved by offset, with given width and style.

Parameters:
c list of points to put markers on.
width width of the marker
style string denoting the marker type.
offset offset to be added to all points in the previous list.
See also:
marker(int, int)

template<class T>
virtual void cvr::drawBase< T >::marker ( const ipointList c,
eMarkerType  t,
const ipoint offset = ipoint(0, 0) 
) [inline, virtual]

Sets given marker types at all positions in c, moved by offset.

Parameters:
c list of points to put markers on.
t type of the markers.
offset offset to be added to all points in the previous list.
See also:
marker(int, int)

template<class T>
virtual void cvr::drawBase< T >::marker ( const ipointList c,
const char *  style,
const ipoint offset = ipoint(0, 0) 
) [inline, virtual]

Sets markers at all positions in c, moved by offset, with given style.

Parameters:
c list of points to put markers on.
style string with format for the markers.
offset offset to be added to all points in the previous list.
See also:
marker(int, int)

template<class T>
virtual void cvr::drawBase< T >::marker ( const ipointList c,
int  width,
const ipoint offset = ipoint(0, 0) 
) [inline, virtual]

Sets markers at all positions in c, moved by offset, with given width.

See also:
marker(int, int)
Parameters:
c list of points to put markers on.
width width for all markers.
offset offset to be added to all points in the previous list.

template<class T>
virtual void cvr::drawBase< T >::marker ( const ipointList c,
const ipoint offset = ipoint(0, 0) 
) [inline, virtual]

Sets markers at all positions in c, moved by offset.

See also:
marker(int, int)
Parameters:
c list of points to put markers on.
offset offset to be added to all points in the previous list.

template<class T>
virtual void cvr::drawBase< T >::marker ( const ipoint p,
int  width,
const char *  style 
) [inline, virtual]

Set marker at p with given width and style.

See also:
marker(int, int)

template<class T>
virtual void cvr::drawBase< T >::marker ( const ipoint p,
int  width,
eMarkerType  t 
) [inline, virtual]

Set given marker type at p with given width.

See also:
marker(int, int)

template<class T>
virtual void cvr::drawBase< T >::marker ( const ipoint p,
eMarkerType  t 
) [inline, virtual]

Set given marker type at p.

See also:
marker(int, int)

template<class T>
virtual void cvr::drawBase< T >::marker ( const ipoint p,
const char *  style 
) [inline, virtual]

Set marker at p with given style.

See also:
marker(int, int)

template<class T>
virtual void cvr::drawBase< T >::marker ( const ipoint p,
int  width 
) [inline, virtual]

Set marker at p with given width.

See also:
marker(int, int)

template<class T>
virtual void cvr::drawBase< T >::marker ( const ipoint p  )  [inline, virtual]

Set marker at p.

See also:
marker(int, int)

template<class T>
virtual void cvr::drawBase< T >::marker ( int  x,
int  y,
int  w,
eMarkerType  t 
) [inline, virtual]

Set marker at point (x, y).

If there is no style, markerType or width is given, the value set by the setStyle or setWidth is used.

Parameters:
x the x coordinate
y the y coordinate
w the size of the marker symbol
t the type of the marker

template<class T>
virtual void cvr::drawBase< T >::marker ( int  x,
int  y,
int  w,
const char *  style 
) [inline, virtual]

Set marker at point (x, y).

If there is no style, markerType or width is given, the value set by the setStyle or setWidth is used.

Parameters:
x the x coordinate
y the y coordinate
w the size of the marker symbol
style the style of the marker symbol.

template<class T>
virtual void cvr::drawBase< T >::marker ( int  x,
int  y,
eMarkerType  t 
) [inline, virtual]

Set marker at point (x, y).

If there is no style, markerType or width is given, the value set by the setStyle or setWidth is used.

Parameters:
x the x coordinate
y the y coordinate
t the type of the marker

template<class T>
virtual void cvr::drawBase< T >::marker ( int  x,
int  y,
const char *  style 
) [inline, virtual]

Set marker at point (x, y).

If there is no style, markerType or width is given, the value set by the setStyle or setWidth is used.

Parameters:
x the x coordinate
y the y coordinate
style the style of the marker symbol.

template<class T>
virtual void cvr::drawBase< T >::marker ( int  x,
int  y,
int  width 
) [inline, virtual]

Set marker at point (x, y).

If there is no style, markerType or width is given, the value set by the setStyle or setWidth is used.

Parameters:
x the x coordinate
y the y coordinate
width the size of the marker symbol

template<class T>
virtual void cvr::drawBase< T >::marker ( int  x,
int  y 
) [inline, virtual]

Set marker at point (x, y).

If there is no style, markerType or width is given, the value set by the setStyle or setWidth is used.

Parameters:
x the x coordinate
y the y coordinate

template<class T>
virtual void cvr::drawBase< T >::moveTo ( const ipoint p  )  [inline, virtual]

Doesn't draw anything, only sets the last position to the given coordinates.

This can be useful before using lineTo()

Parameters:
p destination point.

template<class T>
virtual void cvr::drawBase< T >::moveTo ( int  x,
int  y 
) [pure virtual]

Doesn't draw anything, only sets the last position to the given coordinates.

This can be useful before using lineTo()

Parameters:
x x component of the destination point.
y y component of the destination point.

Implemented in cvr::draw< T >.

template<class T>
virtual const std::string& cvr::drawBase< T >::name (  )  const [virtual]

returns the name of this type

Implements cvr::object.

Reimplemented in cvr::draw< T >.

template<class T>
virtual void cvr::drawBase< T >::number ( int  num,
const ipoint p 
) [inline, virtual]

Draw an integer num at position p='x'/'y'.

See also:
number(int, int, int)
Parameters:
num the number to be written
p the coordinates where the number will be drawn

template<class T>
virtual void cvr::drawBase< T >::number ( int  num,
int  x,
int  y 
) [pure virtual]

Draw an integer num at position 'x'/'y'.

According to the typ of the subclass the position and the lenght of the drawn text could differ

Parameters:
num the number to be written
x the column where the number will be drawn
y the row where the number will be drawn

Implemented in cvr::draw< T >.

template<class T>
virtual void cvr::drawBase< T >::polarLine ( const ipoint p,
const float &  length,
const float &  angle 
) [virtual]

Draw a line from the point p with the length "length" and the angle "angle".

The angles should be a value between -2Pi and 2Pi in radian.

Parameters:
p initial position of the line.
length length of the line.
angle angle of the line.

template<class T>
virtual void cvr::drawBase< T >::polygon ( const ipolygonPoints poly,
bool  filled = false,
const float  angle = 0.0f,
const ipoint shift = ipoint(0, 0) 
) [pure virtual]

Draw a polygon represented by the given polygonPoints list optionally, it can be rotated by the given angle and shifted.

Parameters:
poly the polygon vertices
filled true if the polygon must be filled, false otherwise
angle rotation angle on the mean point of the vertices
shift shift amount to the polygon points.

Implemented in cvr::draw< T >.

template<class T>
virtual void cvr::drawBase< T >::rectangle ( const cvr::rectangle< int > &  r,
bool  filled = false 
) [inline, virtual]

Draw a rectangle.

The rectangle must contain the upper left and the bottom right point.

Parameters:
r rectangle to be drawn
filled if true rectangle is filled

Reimplemented in cvr::draw< T >.

template<class T>
virtual void cvr::drawBase< T >::rectangle ( const ipoint upperLeft,
const ipoint bottomRight,
bool  filled = false 
) [inline, virtual]

Draws a rectangle.

Parameters:
upperLeft upper left corner of the rectangle
bottomRight bottom right corner of the rectangle
filled if true rectangle is filled

Reimplemented in cvr::draw< T >.

template<class T>
virtual void cvr::drawBase< T >::rectangle ( int  x1,
int  y1,
int  x2,
int  y2,
bool  filled = false 
) [pure virtual]

Draw a rectangle.

Parameters:
x1 left x-coordinate.
y1 upper y-coordinate.
x2 right x-coordinate.
y2 bottom y-coordinate.
filled if true rectangle is filled

Implemented in cvr::draw< T >.

template<class T>
virtual void cvr::drawBase< T >::set ( const list< affineLocation > &  locs,
bool  approximateEllipse = false,
bool  showAngleLine = false 
) [virtual]

template<class T>
virtual void cvr::drawBase< T >::set ( const list< location > &  locs,
bool  showAngleLine = false 
) [virtual]

draws a list of locations

See also:
set(const location&, bool);

Reimplemented in cvr::draw< T >.

template<class T>
virtual void cvr::drawBase< T >::set ( const affineLocation loc,
bool  approximateEllipse = false,
bool  showAngleLine = false 
) [virtual]

draw an affineLocation.

Depending on approximateEllipse an ellipse is approximated from the transMatrix of loc or the transformed square is drawn.

Parameters:
loc affineLocation
approximateEllipse if true, an ellipse is drawn, otherwise the transformed square
showAngleLine if true, a line from the middle point of the location (given by loc.position) with the angle given by loc.angle will be drawn.

Reimplemented in cvr::draw< T >.

template<class T>
virtual void cvr::drawBase< T >::set ( const rectLocation loc,
bool  showAngleLine = false 
) [virtual]

draw a rectLocation

Parameters:
loc location with position, angle and radius
showAngleLine if true, a line from the middle point of the location (given by loc.position) with the angle given by loc.angle will be drawn.

Reimplemented in cvr::draw< T >.

template<class T>
virtual void cvr::drawBase< T >::set ( const location loc,
bool  showAngleLine = false 
) [virtual]

draw a location.

Parameters:
loc location with position, angle and radius
showAngleLine if true, a line from the middle point of the location (given by loc.position) with the angle given by loc.angle will be drawn.

Reimplemented in cvr::draw< T >.

template<class T>
virtual void cvr::drawBase< T >::set ( const ipointList c,
const ipoint offset = ipoint(0, 0) 
) [virtual]

sets a single pixel at p

sets pixels at all points in c, moved by the given offset

Reimplemented in cvr::draw< T >.

template<class T>
virtual void cvr::drawBase< T >::set ( const ipoint p  )  [inline, virtual]

sets a single pixel at p

Reimplemented in cvr::draw< T >.

template<class T>
virtual void cvr::drawBase< T >::set ( int  x,
int  y 
) [pure virtual]

sets a single pixel at point (x, y) In epsDraw this pixel is a small square.

Implemented in cvr::draw< T >.

template<class T>
virtual void cvr::drawBase< T >::setColor ( const T &  color  )  [pure virtual]

Specifies color to be used.

Implemented in cvr::draw< T >.

template<class T>
virtual void cvr::drawBase< T >::setColor ( const char *  color  )  [pure virtual]

Specifies color to be used.

Implemented in cvr::draw< T >.

template<class T>
virtual void cvr::drawBase< T >::setGray ( const float  k  )  [pure virtual]

Specifies grayscale level to be used (range from 0 to 1) for the next graphics objects.

Implemented in cvr::draw< T >.

template<class T>
virtual void cvr::drawBase< T >::setMarkerSize ( int  size  )  [virtual]

Specifies the size for the next markers.

Default is 5 in draw and 2 in epsDraw

template<class T>
virtual void cvr::drawBase< T >::setMarkerType ( eMarkerType  m  )  [virtual]

Specifies the marker type to be used for points.

template<class T>
virtual void cvr::drawBase< T >::setStyle ( const char *  style  )  [virtual]

Sets the style used for drawing points.

This includes the color and the symbols for the point

See also:
point(int, int, const char*)
The string characterizing consists of two parts: the first definining color and the second defining the symbol. These are as close to the MATLAB(TM) attributes as possible. If one of the parts is missing, the corresponding value remains unchanged.

Colors
Symbols
yyellow
mmagenta
ccyan
rred
ggreen
bblue
wwhite
kblack

.point/pixel
ocircle
xx-mark
+plus
*star
ssquare
ddiamond
^triangle (up)
vtriangle (down)
<triangle (left)
>triangle (right)
#dot

In addition all colors except for black can be darkened by a number between 0 and 9 following the color letter. The default is 0. The higher the number, the darker the color. Also the closed symbols are available in a filled version. This is activated by an 'f' following the symbol specifier.

Colors only work properly if the canvas used is of type image, ie using rgbPixel as template type. Otherwise, gray-levels are used instead of the colors. Here, 'c', 'm', and 'y' result in the same gray-level as do 'r', 'g' and 'b'. For better predictability use white with different factors for getting gray-levels.

A change of the color using setColor(const char*) or setColor(const T&) does not affect the type of symbol being used.

template<class T>
virtual void cvr::drawBase< T >::text ( const std::string  txt,
const ipoint p 
) [inline, virtual]

Draw the given text at the position p=(x, y).

See also:
test(std::string, int, int)
Parameters:
txt the output text
p coordinate in the image where the text will be written.

template<class T>
virtual void cvr::drawBase< T >::text ( const std::string  txt,
int  x,
int  y 
) [pure virtual]

Draw the given text at the position x, y.

According to the typ of the subclass the position and the lenght of the drawn text could differ

Parameters:
txt the output text
x the x coordinate in the image where the text will be written
y the y coordinate in the image where the text will be written

Implemented in cvr::draw< T >.

template<class T>
virtual void cvr::drawBase< T >::verticalLine ( const ipoint p1,
const ipoint p2 
) [inline, virtual]

Draws a vertical line from (p1.x, p1.y) to (p1.x, p2.y).

Parameters:
p1 position of the initial point
p2 provides only the end y position of the line.

Reimplemented in cvr::draw< T >.

template<class T>
virtual void cvr::drawBase< T >::verticalLine ( int  x,
int  y1,
int  y2 
) [pure virtual]

Draws a vertical line from (x, y1) to (x, y2).

Parameters:
x x component of the line
y1 y component of the initial point.
y2 y component of the final point.

Implemented in cvr::draw< T >.


Member Data Documentation

template<class T>
int cvr::drawBase< T >::actSize_ [protected]

the actual size that is used for markers for epsDraw the default is 1 and for draw the default is 5 because the elements are much smaller and with a size smaller than 5 they are indistinguishable.

template<class T>
eMarkerType cvr::drawBase< T >::actSymbol_ [protected]

the actual symbol that is used for markers

template<class T>
int cvr::drawBase< T >::actX_ [protected]

actual (last used) position X

template<class T>
int cvr::drawBase< T >::actY_ [protected]

actual (last used) position Y

template<class T>
bool cvr::drawBase< T >::filled_ [protected]

If true symbols are filled where possible.

template<class T>
bool cvr::drawBase< T >::useFillPattern_ [protected]

Flag telling the drawing methods to use the pattern.

template<class T>
bool cvr::drawBase< T >::useLinePattern_ [protected]

The pattern for drawing lines.

The pattern for filling areas. Flag telling the drawing methods to use the pattern.


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

Generated on Sun Sep 20 22:08:41 2009 for CVR-Lib by Doxygen 1.5.8