LTI-Lib latest version v1.9 - last update 10 Apr 2010

lti::drawBase< T > Class Template Reference

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

#include <ltiDrawBase.h>

Inheritance diagram for lti::drawBase< T >:
Inheritance graph
[legend]
Collaboration diagram for lti::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,
  LtiLogo
}

Public Member Functions

 drawBase ()
 drawBase (const drawBase &other)
virtual ~drawBase ()
drawBasecopy (const drawBase &other)
virtual const char * getTypeName () const
virtual void setGray (const float k)=0
virtual void setMarkerSize (const 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 (const eMarkerType m)
virtual void setLinePattern (const linePattern &pat)
virtual void setFillPattern (const fillPattern &pat)
virtual point getCanvasSize ()=0
virtual void set (const int x, const int y)=0
virtual void set (const point &p)
template<class U >
void set (const hPoint2D< U > &p)
virtual void set (const pointList &c, const point &offset=point(0, 0))
virtual void set (const location &loc, const bool showAngleLine=false)
virtual void set (const rectLocation &loc, const bool showAngleLine=false)
virtual void set (const std::list< location > &locs, const bool showAngleLine=false)
virtual void marker (const int x, const int y)
virtual void marker (const int x, const int y, const int width)
virtual void marker (const int x, const int y, const char *style)
virtual void marker (const int x, const int y, const eMarkerType t)
virtual void marker (const int x, const int y, const int w, const char *style)
virtual void marker (const int x, const int y, const int w, eMarkerType t)
virtual void marker (const point &p)
virtual void marker (const point &p, const int width)
virtual void marker (const point &p, char *style)
virtual void marker (const point &p, eMarkerType t)
virtual void marker (const point &p, int width, eMarkerType t)
virtual void marker (const point &p, int width, char *style)
template<class U >
void marker (const hPoint2D< U > &p)
template<class U >
void marker (const hPoint2D< U > &p, const int width)
template<class U >
void marker (const hPoint2D< U > &p, const eMarkerType t)
template<class U >
void marker (const hPoint2D< U > &p, const char *style)
template<class U >
void marker (const hPoint2D< U > &p, const int width, const eMarkerType t)
template<class U >
void marker (const hPoint2D< U > &p, const int width, const char *style)
virtual void marker (const pointList &c, const point &offset=point(0, 0))
virtual void marker (const pointList &c, int width, const point &offset=point(0, 0))
virtual void marker (const pointList &c, char *style, const point &offset=point(0, 0))
virtual void marker (const pointList &c, eMarkerType t, const point &offset=point(0, 0))
virtual void marker (const pointList &c, int width, char *style, const point &offset=point(0, 0))
virtual void marker (const pointList &c, int width, eMarkerType t, const point &offset=point(0, 0))
virtual void line (const int fx, const int fy, const int tx, const int ty)=0
virtual void line (const point &p1, const point &p2)
virtual void lineTo (const int x, const int y)=0
virtual void lineTo (const point &p)
virtual void verticalLine (const int x, const int y1, const int y2)=0
virtual void horizontalLine (const int x1, const int x2, const int y)=0
virtual void verticalLine (const point &p1, const point &p2)
virtual void horizontalLine (const point &p1, const point &p2)
virtual void polarLine (const point &p, const float &length, const float &angle)
virtual void grid (const point &delta, const bool interval)=0
virtual void box (const int x1, const int y1, const int x2, const int y2, const bool &filled=false)
virtual void box (const point &upperLeft, const point &bottomRight, const bool &filled=false)
virtual void box (const trectangle< int > &r, const bool &filled=false)
virtual void rectangle (const int x1, const int y1, const int x2, const int y2, const bool &filled=false)=0
virtual void rectangle (const point &upperLeft, const point &bottomRight, const bool &filled=false)
virtual void rectangle (const trectangle< int > &r, const bool &filled=false)
virtual void circle (const point &p1, const int r, const bool &filled=false)=0
virtual void ellipse (const point &p1, const int aX, const int aY, const bool &filled=false)=0
virtual void ellipse (const point &p1, const int aX, const int aY, const float &angle, const bool &filled=false)=0
virtual void arc (const point &p1, const point &pA, const point &pB)=0
virtual void arrow (const int fx, const int fy, const int tx, const int ty, const float &size=0.2f)=0
virtual void arrow (const point &p1, const point &p2, const float &size=0.2f)
virtual void text (const std::string txt, const int x, const int y)=0
virtual void text (const std::string txt, const point &p)
virtual void number (const int num, const int x, const int y)=0
virtual void number (const int num, const point &p)

Protected Attributes

int actX
int actY
eMarkerType actSymbol
int actSize
bool filled
linePattern linepat
fillPattern fillpat
bool useLinePattern
bool useFillPattern

Detailed Description

template<class T>
class lti::drawBase< T >

Abstract parent class for draw and epsDraw.

This class provides all methods that are implemented in ltiDraw and ltiEpsDraw. 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 lti::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 ('#').

LtiLogo 

LTI-Logo.


Constructor & Destructor Documentation

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

default constructor

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

copy constructor

Parameters:
other the object to be copied
template<class T>
virtual lti::drawBase< T >::~drawBase (  )  [virtual]

destructor


Member Function Documentation

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

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

Implemented in lti::draw< T >, lti::epsDraw< T >, and lti::draw< rgbPixel >.

template<class T>
virtual void lti::drawBase< T >::arrow ( const point p1,
const point 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.

Reimplemented in lti::draw< T >, lti::epsDraw< T >, and lti::draw< rgbPixel >.

template<class T>
virtual void lti::drawBase< T >::arrow ( const int  fx,
const int  fy,
const int  tx,
const 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.

Implemented in lti::draw< T >, lti::epsDraw< T >, and lti::draw< rgbPixel >.

Referenced by lti::drawBase< rgbPixel >::arrow().

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

draw a box.

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

Deprecated:
use rectangle(rectangle&, const bool) instead!
See also:
box(int,int,int,int,const bool)

Reimplemented in lti::draw< T >, lti::epsDraw< T >, and lti::draw< rgbPixel >.

template<class T>
virtual void lti::drawBase< T >::box ( const point upperLeft,
const point bottomRight,
const bool &  filled = false 
) [inline, virtual]

draws a box.

Deprecated:
use rectangle(point&, point&, const bool) instead!
See also:
box(int,int,int,int,const bool)

Reimplemented in lti::draw< T >, lti::epsDraw< T >, and lti::draw< rgbPixel >.

template<class T>
virtual void lti::drawBase< T >::box ( const int  x1,
const int  y1,
const int  x2,
const int  y2,
const bool &  filled = false 
) [inline, virtual]

draw a box.

Deprecated:
use rectangle(int, int, int, int, const bool) instead!
Parameters:
x1 left x-coordinate.
y1 upper y-coordinate.
x2 right x-coordinate.
y2 bottom y-coordinate.
filled if true box is filled

Reimplemented in lti::draw< T >, lti::epsDraw< T >, lti::patternDraw< T >, and lti::draw< rgbPixel >.

Referenced by lti::drawBase< rgbPixel >::box().

template<class T>
virtual void lti::drawBase< T >::circle ( const point p1,
const int  r,
const 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 lti::draw< T >, lti::epsDraw< T >, lti::patternDraw< T >, and lti::draw< rgbPixel >.

template<class T>
drawBase& lti::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

Reimplemented in lti::scene3D< T >.

template<class T>
virtual void lti::drawBase< T >::ellipse ( const point p1,
const int  aX,
const int  aY,
const float &  angle,
const 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 lti::draw< T >, lti::epsDraw< T >, lti::patternDraw< T >, and lti::draw< rgbPixel >.

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

draw an ellipse with center 'p1' and main axes 'aX' and 'aY'

Implemented in lti::draw< T >, lti::epsDraw< T >, lti::patternDraw< T >, and lti::draw< rgbPixel >.

template<class T>
virtual point lti::drawBase< T >::getCanvasSize (  )  [pure virtual]

returns the size of the drawing area.

Implemented in lti::draw< T >, lti::epsDraw< T >, and lti::draw< rgbPixel >.

Referenced by lti::SOFM2DVisualizer::sammonsMapper().

template<class T>
virtual const char* lti::drawBase< T >::getTypeName (  )  const [virtual]
template<class T>
virtual void lti::drawBase< T >::grid ( const point delta,
const 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. This method is actually not implemented in epsDraw !!!

Implemented in lti::draw< T >, lti::epsDraw< T >, and lti::draw< rgbPixel >.

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

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

Reimplemented in lti::draw< T >, lti::epsDraw< T >, and lti::draw< rgbPixel >.

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

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

Implemented in lti::draw< T >, lti::epsDraw< T >, lti::patternDraw< T >, and lti::draw< rgbPixel >.

Referenced by lti::drawBase< rgbPixel >::horizontalLine().

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

Draws a line from the point p to point p2.

See also:
line(int,int,int,int)

Reimplemented in lti::draw< T >, lti::epsDraw< T >, and lti::draw< rgbPixel >.

template<class T>
virtual void lti::drawBase< T >::line ( const int  fx,
const int  fy,
const int  tx,
const 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.

Implemented in lti::draw< T >, lti::epsDraw< T >, lti::patternDraw< T >, and lti::draw< rgbPixel >.

Referenced by lti::drawBase< rgbPixel >::line().

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

Draw a line from the last point to point p.

See also:
lineTo(int,int)

Reimplemented in lti::draw< T >, lti::epsDraw< T >, and lti::draw< rgbPixel >.

template<class T>
virtual void lti::drawBase< T >::lineTo ( const int  x,
const 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.

Implemented in lti::draw< T >, lti::epsDraw< T >, and lti::draw< rgbPixel >.

Referenced by lti::drawBase< rgbPixel >::lineTo(), and lti::SOFM2DVisualizer::sammonsMapper().

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

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

See also:
marker(int,int)
template<class T>
virtual void lti::drawBase< T >::marker ( const pointList c,
int  width,
char *  style,
const point offset = point(0, 0) 
) [virtual]

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

See also:
marker(int,int)
template<class T>
virtual void lti::drawBase< T >::marker ( const pointList c,
eMarkerType  t,
const point offset = point(0,0) 
) [inline, virtual]

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

See also:
marker(int,int)
template<class T>
virtual void lti::drawBase< T >::marker ( const pointList c,
char *  style,
const point offset = point(0,0) 
) [inline, virtual]

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

See also:
marker(int,int)
template<class T>
virtual void lti::drawBase< T >::marker ( const pointList c,
int  width,
const point offset = point(0,0) 
) [inline, virtual]

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

See also:
marker(int,int)
template<class T>
virtual void lti::drawBase< T >::marker ( const pointList c,
const point offset = point(0,0) 
) [inline, virtual]

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

See also:
marker(int,int)
template<class T>
template<class U >
void lti::drawBase< T >::marker ( const hPoint2D< U > &  p,
const int  width,
const char *  style 
) [inline]

Set marker at p with given width and style.

See also:
marker(int,int)
template<class T>
template<class U >
void lti::drawBase< T >::marker ( const hPoint2D< U > &  p,
const int  width,
const eMarkerType  t 
) [inline]

Set given marker type at p with given width.

See also:
marker(int,int)
template<class T>
template<class U >
void lti::drawBase< T >::marker ( const hPoint2D< U > &  p,
const char *  style 
) [inline]

Set marker at p width given style.

See also:
marker(int,int,char*)
template<class T>
template<class U >
void lti::drawBase< T >::marker ( const hPoint2D< U > &  p,
const eMarkerType  t 
) [inline]

Set given marker type at p.

See also:
marker(int,int)
template<class T>
template<class U >
void lti::drawBase< T >::marker ( const hPoint2D< U > &  p,
const int  width 
) [inline]

Set marker at p width given width.

See also:
marker(int,int)
template<class T>
template<class U >
void lti::drawBase< T >::marker ( const hPoint2D< U > &  p  )  [inline]

Set marker at p.

Parameters:
p coordinates of the pixel to be set
See also:
marker(int,int)
template<class T>
virtual void lti::drawBase< T >::marker ( const point p,
int  width,
char *  style 
) [inline, virtual]

Set marker at p with given width and style.

See also:
marker(int,int)
template<class T>
virtual void lti::drawBase< T >::marker ( const point 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 lti::drawBase< T >::marker ( const point p,
eMarkerType  t 
) [inline, virtual]

Set given marker type at p.

See also:
marker(int,int)
template<class T>
virtual void lti::drawBase< T >::marker ( const point p,
char *  style 
) [inline, virtual]

Set marker at p with given style.

See also:
marker(int,int)
template<class T>
virtual void lti::drawBase< T >::marker ( const point p,
const int  width 
) [inline, virtual]

Set marker at p with given width.

See also:
marker(int,int)
template<class T>
virtual void lti::drawBase< T >::marker ( const point p  )  [inline, virtual]

Set marker at p.

See also:
marker(int,int)
template<class T>
virtual void lti::drawBase< T >::marker ( const int  x,
const int  y,
const 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 lti::drawBase< T >::marker ( const int  x,
const int  y,
const 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 lti::drawBase< T >::marker ( const int  x,
const int  y,
const 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 lti::drawBase< T >::marker ( const int  x,
const 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 lti::drawBase< T >::marker ( const int  x,
const int  y,
const 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 lti::drawBase< T >::marker ( const int  x,
const 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

Referenced by lti::drawBase< rgbPixel >::marker(), and lti::SOFM2DVisualizer::sammonsMapper().

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

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

See also:
number(int,int,int)

Reimplemented in lti::epsDraw< T >.

template<class T>
virtual void lti::drawBase< T >::number ( const int  num,
const int  x,
const 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 lti::draw< T >, lti::epsDraw< T >, and lti::draw< rgbPixel >.

template<class T>
virtual void lti::drawBase< T >::polarLine ( const point 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.

template<class T>
virtual void lti::drawBase< T >::rectangle ( const trectangle< int > &  r,
const 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 lti::draw< T >, lti::epsDraw< T >, and lti::draw< rgbPixel >.

template<class T>
virtual void lti::drawBase< T >::rectangle ( const point upperLeft,
const point bottomRight,
const 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 lti::draw< T >, lti::epsDraw< T >, and lti::draw< rgbPixel >.

template<class T>
virtual void lti::drawBase< T >::rectangle ( const int  x1,
const int  y1,
const int  x2,
const int  y2,
const 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 lti::draw< T >, lti::epsDraw< T >, and lti::draw< rgbPixel >.

Referenced by lti::drawBase< rgbPixel >::box(), lti::SOFM2DVisualizer::componentPlane(), lti::SOFM2DVisualizer::drawClasses(), lti::SOFM2DVisualizer::drawHits(), lti::drawBase< rgbPixel >::rectangle(), and lti::SOFM2DVisualizer::uMatrix().

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

draws a list of locations

Reimplemented in lti::draw< T >, lti::epsDraw< T >, and lti::draw< rgbPixel >.

template<class T>
virtual void lti::drawBase< T >::set ( const rectLocation loc,
const 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 lti::draw< T >, lti::epsDraw< T >, and lti::draw< rgbPixel >.

template<class T>
virtual void lti::drawBase< T >::set ( const location loc,
const 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 lti::draw< T >, lti::epsDraw< T >, and lti::draw< rgbPixel >.

template<class T>
virtual void lti::drawBase< T >::set ( const pointList c,
const point offset = point(0, 0) 
) [virtual]

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

Reimplemented in lti::draw< T >, lti::epsDraw< T >, and lti::draw< rgbPixel >.

template<class T>
template<class U >
void lti::drawBase< T >::set ( const hPoint2D< U > &  p  )  [inline]

sets a single pixel at p

Reimplemented in lti::draw< T >, lti::epsDraw< T >, and lti::draw< rgbPixel >.

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

sets a single pixel at p

Reimplemented in lti::draw< T >, lti::epsDraw< T >, and lti::draw< rgbPixel >.

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

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

Implemented in lti::draw< T >, lti::epsDraw< T >, and lti::draw< rgbPixel >.

Referenced by lti::SOFM2DVisualizer::sammonsMapper().

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

Specifies color to be used.

Implemented in lti::draw< T >, lti::epsDraw< T >, and lti::draw< rgbPixel >.

Referenced by lti::SOFM2DVisualizer::drawClasses().

template<class T>
virtual void lti::drawBase< T >::setFillPattern ( const fillPattern pat  )  [virtual]

Sets the pattern for filling areas.

All subsequenly filled areas will be filled with the given pattern. The default pattern is a homogenouos fill.

Parameters:
pat pattern for filling areas.

Reimplemented in lti::epsDraw< T >, and lti::patternDraw< T >.

template<class T>
virtual void lti::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 lti::draw< T >, lti::epsDraw< T >, and lti::draw< rgbPixel >.

Referenced by lti::SOFM2DVisualizer::componentPlane(), lti::SOFM2DVisualizer::drawHits(), and lti::SOFM2DVisualizer::uMatrix().

template<class T>
virtual void lti::drawBase< T >::setLinePattern ( const linePattern pat  )  [virtual]

Sets the pattern for drawing lines.

All subsequent lines will be drawn in the given pattern. The default is the continuous line.

Parameters:
pat pattern for drawing lines.

Reimplemented in lti::epsDraw< T >, and lti::patternDraw< T >.

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

Specifies the size for the next markers.

Default is 5 in draw and 2 in epsDraw

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

Specifies the marker type to be used for points.

template<class T>
virtual void lti::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(const int, const 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

y

yellow

m

magenta

c

cyan

r

red

g

green

b

blue

w

white

k

black


.

point/pixel

o

circle

x

x-mark

+

plus

*

star

s

square

d

diamond

^

triangle (up)

v

triangle (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.

Reimplemented in lti::scene3D< T >, and lti::scene3D< rgbPixel >.

Referenced by lti::SOFM2DVisualizer::sammonsMapper().

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

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

See also:
test(std::string,int,int)
template<class T>
virtual void lti::drawBase< T >::text ( const std::string  txt,
const int  x,
const 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 lti::draw< T >, lti::epsDraw< T >, and lti::draw< rgbPixel >.

Referenced by lti::drawBase< rgbPixel >::text().

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

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

Reimplemented in lti::draw< T >, lti::epsDraw< T >, and lti::draw< rgbPixel >.

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

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

Implemented in lti::draw< T >, lti::epsDraw< T >, lti::patternDraw< T >, and lti::draw< rgbPixel >.

Referenced by lti::drawBase< rgbPixel >::verticalLine().


Member Data Documentation

template<class T>
int lti::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.

Referenced by lti::drawBase< rgbPixel >::marker().

template<class T>
eMarkerType lti::drawBase< T >::actSymbol [protected]

the actual symbol that is used for markers

Referenced by lti::drawBase< rgbPixel >::marker().

template<class T>
int lti::drawBase< T >::actX [protected]

actual (last used) position X

template<class T>
int lti::drawBase< T >::actY [protected]

actual (last used) position Y

template<class T>
bool lti::drawBase< T >::filled [protected]
template<class T>
fillPattern lti::drawBase< T >::fillpat [protected]

The pattern for filling areas.

template<class T>
linePattern lti::drawBase< T >::linepat [protected]

The pattern for drawing lines.

template<class T>
bool lti::drawBase< T >::useFillPattern [protected]

Flag telling the drawing methods to use the pattern.

template<class T>
bool lti::drawBase< T >::useLinePattern [protected]

Flag telling the drawing methods to use the pattern.


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

Generated on Sat Apr 10 15:27:15 2010 for LTI-Lib by Doxygen 1.6.1