latest version v1.9 - last update 10 Apr 2010 |
Abstract parent class for draw and epsDraw. More...
#include <ltiDrawBase.h>
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 () |
drawBase & | copy (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 |
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.
enum lti::drawBase::eMarkerType |
Specifies different types of marker which can be defined for the marker-method.
lti::drawBase< T >::drawBase | ( | ) |
default constructor
lti::drawBase< T >::drawBase | ( | const drawBase< T > & | other | ) |
copy constructor
other | the object to be copied |
virtual lti::drawBase< T >::~drawBase | ( | ) | [virtual] |
destructor
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 >.
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 >.
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().
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
Reimplemented in lti::draw< T >, lti::epsDraw< T >, and lti::draw< rgbPixel >.
virtual void lti::drawBase< T >::box | ( | const point & | upperLeft, | |
const point & | bottomRight, | |||
const bool & | filled = false | |||
) | [inline, virtual] |
draws a box.
Reimplemented in lti::draw< T >, lti::epsDraw< T >, and lti::draw< rgbPixel >.
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.
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().
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'
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 >.
drawBase& lti::drawBase< T >::copy | ( | const drawBase< T > & | other | ) |
copy data of "other" functor.
other | the functor to be copied |
Reimplemented in lti::scene3D< 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.
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 >.
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 >.
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().
virtual const char* lti::drawBase< T >::getTypeName | ( | ) | const [virtual] |
returns the name of this type ("drawBase")
Reimplemented from lti::object.
Reimplemented in lti::draw< T >, lti::draw3D< T >, lti::epsDraw< T >, lti::patternDraw< T >, lti::scene3D< T >, lti::draw< rgbPixel >, lti::draw3D< rgbPixel >, and lti::scene3D< rgbPixel >.
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 >.
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 >.
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().
virtual void lti::drawBase< T >::line | ( | const point & | p1, | |
const point & | p2 | |||
) | [inline, virtual] |
Draws a line from the point p to point p2.
Reimplemented in lti::draw< T >, lti::epsDraw< T >, and lti::draw< rgbPixel >.
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().
virtual void lti::drawBase< T >::lineTo | ( | const point & | p | ) | [inline, virtual] |
Draw a line from the last point to point p.
Reimplemented in lti::draw< T >, lti::epsDraw< T >, and lti::draw< rgbPixel >.
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().
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.
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.
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.
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.
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.
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.
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.
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.
void lti::drawBase< T >::marker | ( | const hPoint2D< U > & | p, | |
const char * | style | |||
) | [inline] |
Set marker at p width given style.
void lti::drawBase< T >::marker | ( | const hPoint2D< U > & | p, | |
const eMarkerType | t | |||
) | [inline] |
Set given marker type at p.
void lti::drawBase< T >::marker | ( | const hPoint2D< U > & | p, | |
const int | width | |||
) | [inline] |
Set marker at p width given width.
void lti::drawBase< T >::marker | ( | const hPoint2D< U > & | p | ) | [inline] |
virtual void lti::drawBase< T >::marker | ( | const point & | p, | |
int | width, | |||
char * | style | |||
) | [inline, virtual] |
Set marker at p with given width and style.
virtual void lti::drawBase< T >::marker | ( | const point & | p, | |
int | width, | |||
eMarkerType | t | |||
) | [inline, virtual] |
Set given marker type at p with given width.
virtual void lti::drawBase< T >::marker | ( | const point & | p, | |
eMarkerType | t | |||
) | [inline, virtual] |
Set given marker type at p.
virtual void lti::drawBase< T >::marker | ( | const point & | p, | |
char * | style | |||
) | [inline, virtual] |
Set marker at p with given style.
virtual void lti::drawBase< T >::marker | ( | const point & | p, | |
const int | width | |||
) | [inline, virtual] |
Set marker at p with given width.
virtual void lti::drawBase< T >::marker | ( | const point & | p | ) | [inline, virtual] |
Set marker at p.
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.
x | the x coordinate | |
y | the y coordinate | |
w | the size of the marker symbol | |
t | the type of the marker |
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.
x | the x coordinate | |
y | the y coordinate | |
w | the size of the marker symbol | |
style | the style of the marker symbol. |
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.
x | the x coordinate | |
y | the y coordinate | |
t | the type of the marker |
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.
x | the x coordinate | |
y | the y coordinate | |
style | the style of the marker symbol. |
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.
x | the x coordinate | |
y | the y coordinate | |
width | the size of the marker symbol |
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.
x | the x coordinate | |
y | the y coordinate |
Referenced by lti::drawBase< rgbPixel >::marker(), and lti::SOFM2DVisualizer::sammonsMapper().
virtual void lti::drawBase< T >::number | ( | const int | num, | |
const point & | p | |||
) | [inline, virtual] |
draw an integer num
at position p='x'/'y'.
Reimplemented in lti::epsDraw< 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
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 >.
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.
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
r | rectangle to be drawn | |
filled | if true rectangle is filled |
Reimplemented in lti::draw< T >, lti::epsDraw< T >, and lti::draw< rgbPixel >.
virtual void lti::drawBase< T >::rectangle | ( | const point & | upperLeft, | |
const point & | bottomRight, | |||
const bool & | filled = false | |||
) | [inline, virtual] |
draws a rectangle.
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 >.
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.
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().
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 >.
virtual void lti::drawBase< T >::set | ( | const rectLocation & | loc, | |
const bool | showAngleLine = false | |||
) | [virtual] |
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 >.
virtual void lti::drawBase< T >::set | ( | const location & | loc, | |
const bool | showAngleLine = false | |||
) | [virtual] |
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 >.
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 >.
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 >.
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 >.
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().
virtual void lti::drawBase< T >::setColor | ( | const T & | color | ) | [pure virtual] |
Specifies color to be used.
Implemented in lti::draw< T >, lti::epsDraw< T >, lti::scene3D< T >, lti::draw< rgbPixel >, and lti::scene3D< rgbPixel >.
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().
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.
pat | pattern for filling areas. |
Reimplemented in lti::epsDraw< T >, and lti::patternDraw< 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().
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.
pat | pattern for drawing lines. |
Reimplemented in lti::epsDraw< T >, and lti::patternDraw< T >.
virtual void lti::drawBase< T >::setMarkerSize | ( | const int | size | ) | [virtual] |
virtual void lti::drawBase< T >::setMarkerType | ( | const eMarkerType | m | ) | [virtual] |
Specifies the marker type to be used for points.
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
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 | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
|
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().
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).
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
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().
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 >.
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().
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().
eMarkerType lti::drawBase< T >::actSymbol [protected] |
the actual symbol that is used for markers
Referenced by lti::drawBase< rgbPixel >::marker().
int lti::drawBase< T >::actX [protected] |
actual (last used) position X
int lti::drawBase< T >::actY [protected] |
actual (last used) position Y
bool lti::drawBase< T >::filled [protected] |
If true symbols are filled where possible.
Referenced by lti::epsDraw< T >::box(), lti::drawBase< rgbPixel >::box(), lti::draw< rgbPixel >::box(), lti::epsDraw< T >::circle(), lti::draw< rgbPixel >::circle(), lti::epsDraw< T >::rectangle(), lti::drawBase< rgbPixel >::rectangle(), and lti::draw< rgbPixel >::rectangle().
fillPattern lti::drawBase< T >::fillpat [protected] |
The pattern for filling areas.
linePattern lti::drawBase< T >::linepat [protected] |
The pattern for drawing lines.
bool lti::drawBase< T >::useFillPattern [protected] |
Flag telling the drawing methods to use the pattern.
bool lti::drawBase< T >::useLinePattern [protected] |
Flag telling the drawing methods to use the pattern.