|
latest version v1.9 - last update 24 Nov 2005 |
|
#include <ltiDrawBase.h>
Inheritance diagram for lti::drawBase< T >:


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 |
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.
|
|||||
|
Specifies different types of marker which can be defined for the marker-method.
|
|
|||||||||
|
default constructor
|
|
||||||||||
|
copy constructor
|
|
|||||||||
|
destructor
|
|
||||||||||||||||||||
|
draw an arc from 'pA' to 'pB', clockwise around center 'p1'.
Implemented in lti::draw< T >, lti::epsDraw< T >, and lti::draw< rgbPixel >. |
|
||||||||||||||||||||
|
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 >. |
|
||||||||||||||||||||||||||||
|
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 >. |
|
||||||||||||||||
|
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 >. |
|
||||||||||||||||||||
|
draws a box.
Reimplemented in lti::draw< T >, lti::epsDraw< T >, and lti::draw< rgbPixel >. |
|
||||||||||||||||||||||||||||
|
draw a box.
Reimplemented in lti::draw< T >, lti::epsDraw< T >, lti::patternDraw< T >, and lti::draw< rgbPixel >. |
|
||||||||||||||||||||
|
draw a circle with circle center 'p1' and radius 'r'
Implemented in lti::draw< T >, lti::epsDraw< T >, lti::patternDraw< T >, and lti::draw< rgbPixel >. |
|
||||||||||
|
copy data of "other" functor.
|
|
||||||||||||||||||||||||||||
|
Draw an ellipse with center 'p1' and main axes 'aX' and 'aY'. The ellipse is turned by the given angle.
Implemented in lti::draw< T >, lti::epsDraw< T >, lti::patternDraw< T >, and lti::draw< rgbPixel >. |
|
||||||||||||||||||||||||
|
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 >. |
|
|||||||||
|
returns the size of the drawing area.
Implemented in lti::draw< T >, lti::epsDraw< T >, and lti::draw< rgbPixel >. |
|
|||||||||
|
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 >. |
|
||||||||||||||||
|
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 >. |
|
||||||||||||||||
|
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 >. |
|
||||||||||||||||||||
|
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 >. |
|
||||||||||||||||
|
Draws a line from the point p to point p2.
Reimplemented in lti::draw< T >, lti::epsDraw< T >, and lti::draw< rgbPixel >. |
|
||||||||||||||||||||||||
|
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 >. |
|
||||||||||
|
Draw a line from the last point to point p.
Reimplemented in lti::draw< T >, lti::epsDraw< T >, and lti::draw< rgbPixel >. |
|
||||||||||||||||
|
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 >. |
|
||||||||||||||||||||||||
|
Sets given marker types at all positions in the c, moved by offset, with given width.
|
|
||||||||||||||||||||||||
|
Sets markers at all positions in the c, moved by offset, with given width and style.
|
|
||||||||||||||||||||
|
Sets given marker types at all positions in c,moved by offset.
|
|
||||||||||||||||||||
|
Sets markers at all positions in c,moved by offset, with given style.
|
|
||||||||||||||||||||
|
Sets markers at all positions in c,moved by offset, with given width.
|
|
||||||||||||||||
|
Sets markers at all positions in c,moved by offset.
|
|
||||||||||||||||||||||||
|
Set marker at p with given width and style.
|
|
||||||||||||||||||||||||
|
Set given marker type at p with given width.
|
|
||||||||||||||||||||
|
Set marker at p width given style.
|
|
||||||||||||||||||||
|
Set given marker type at p.
|
|
||||||||||||||||||||
|
Set marker at p width given width.
|
|
||||||||||||||
|
Set marker at p.
|
|
||||||||||||||||||||
|
Set marker at p with given width and style.
|
|
||||||||||||||||||||
|
Set given marker type at p with given width.
|
|
||||||||||||||||
|
Set given marker type at p.
|
|
||||||||||||||||
|
Set marker at p with given style.
|
|
||||||||||||||||
|
Set marker at p with given width.
|
|
||||||||||
|
Set marker at p.
|
|
||||||||||||||||||||||||
|
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.
|
|
||||||||||||||||||||||||
|
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.
|
|
||||||||||||||||||||
|
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.
|
|
||||||||||||||||||||
|
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.
|
|
||||||||||||||||||||
|
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.
|
|
||||||||||||||||
|
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.
|
|
||||||||||||||||
|
draw an integer
Reimplemented in lti::epsDraw< T >. |
|
||||||||||||||||||||
|
draw an integer According to the typ of the subclass the position and the lenght of the drawn text could differ
Implemented in lti::draw< T >, lti::epsDraw< T >, and lti::draw< rgbPixel >. |
|
||||||||||||||||||||
|
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. |
|
||||||||||||||||
|
draw a rectangle. the rectangle must contain the upper left and the bottom right point
Reimplemented in lti::draw< T >, lti::epsDraw< T >, and lti::draw< rgbPixel >. |
|
||||||||||||||||||||
|
draws a rectangle.
Reimplemented in lti::draw< T >, lti::epsDraw< T >, and lti::draw< rgbPixel >. |
|
||||||||||||||||||||||||||||
|
draw a rectangle.
Implemented in lti::draw< T >, lti::epsDraw< T >, and lti::draw< rgbPixel >. |
|
||||||||||||||||
|
draws a list of locations
Reimplemented in lti::draw< T >, lti::epsDraw< T >, and lti::draw< rgbPixel >. |
|
||||||||||||||||
|
draw a rectLocation
Reimplemented in lti::draw< T >, lti::epsDraw< T >, and lti::draw< rgbPixel >. |
|
||||||||||||||||
|
draw a location.
Reimplemented in lti::draw< T >, lti::epsDraw< T >, and lti::draw< rgbPixel >. |
|
||||||||||||||||
|
sets pixels at all points in c, moved by the given offset
Reimplemented in lti::draw< T >, lti::epsDraw< T >, and lti::draw< rgbPixel >. |
|
||||||||||||||
|
sets a single pixel at p
Reimplemented in lti::draw< T >, lti::epsDraw< T >, and lti::draw< rgbPixel >. |
|
||||||||||
|
sets a single pixel at p
Reimplemented in lti::draw< T >, lti::epsDraw< T >, and lti::draw< rgbPixel >. |
|
||||||||||||||||
|
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 >. |
|
||||||||||
|
Specifies color to be used.
Implemented in lti::draw< T >, lti::epsDraw< T >, lti::scene3D< T >, lti::draw< rgbPixel >, and lti::scene3D< rgbPixel >. |
|
||||||||||
|
Specifies color to be used.
Implemented in lti::draw< T >, lti::epsDraw< T >, and lti::draw< rgbPixel >. |
|
||||||||||
|
Sets the pattern for filling areas. All subsequenly filled areas will be filled with the given pattern. The default pattern is a homogenouos fill.
Reimplemented in lti::epsDraw< T >, and lti::patternDraw< T >. |
|
||||||||||
|
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 >. |
|
||||||||||
|
Sets the pattern for drawing lines. All subsequent lines will be drawn in the given pattern. The default is the continuous line.
Reimplemented in lti::epsDraw< T >, and lti::patternDraw< T >. |
|
||||||||||
|
Specifies the size for the next markers. Default is 5 in draw and 2 in epsDraw |
|
||||||||||
|
Specifies the marker type to be used for points.
|
|
||||||||||
|
Sets the style used for drawing points. This includes the color and the symbols for the point
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 >. |
|
||||||||||||||||
|
Draw the given text at the position p=(x,y).
|
|
||||||||||||||||||||
|
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
Implemented in lti::draw< T >, lti::epsDraw< T >, and lti::draw< rgbPixel >. |
|
||||||||||||||||
|
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 >. |
|
||||||||||||||||||||
|
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 >. |
|
|||||
|
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.
|
|
|||||
|
the actual symbol that is used for markers
|
|
|||||
|
actual (last used) position X
|
|
|||||
|
actual (last used) position Y
|
|
|||||
|
If true symbols are filled where possible.
|
|
|||||
|
The pattern for filling areas.
|
|
|||||
|
The pattern for drawing lines.
|
|
|||||
|
Flag telling the drawing methods to use the pattern.
|
|
|||||
|
Flag telling the drawing methods to use the pattern.
|