Image Component Library (ICL)
|
Abstract class for visualization tasks. More...
#include <VisualizationDescription.h>
Classes | |
struct | Color |
Utility Color class. More... | |
struct | Part |
Single part of the the visualization pipeline. More... | |
struct | Text |
Utility class for Text. More... | |
Public Member Functions | |
const std::vector< Part > & | getParts () const |
returns the parts | |
void | clear () |
clears the list | |
void | addPart (const Part &part) |
adds a given part | |
void | addPart (char c, const Any &content) |
adds a given part | |
VisualizationDescription & | operator+= (const VisualizationDescription &other) |
adds another visualization description | |
VisualizationDescription | operator+ (const VisualizationDescription &other) |
adds two descriptions | |
void | color (icl8u r, icl8u g, icl8u b) |
sets the current draw color (no alpha) | |
void | color (icl8u r, icl8u g, icl8u b, icl8u a) |
sets the current draw color (with alpha) | |
void | fill (icl8u r, icl8u g, icl8u b) |
sets the current fill color (no alpha) | |
void | fill (icl8u r, icl8u g, icl8u b, icl8u a) |
sets the current fill color (with alpha) | |
void | rect (icl32f x, icl32f y, icl32f width, icl32f height) |
add a rectangle | |
void | rect (const Rect32f &r) |
add a rectangle | |
void | ellipse (icl32f x, icl32f y, icl32f width, icl32f height) |
add an ellipse | |
void | ellipse (const Rect32f &r) |
add an ellipse | |
void | circle (icl32f cx, icl32f cy, icl32f radius) |
adds a circle (intnerally handeled as ellipse) | |
void | line (icl32f x1, icl32f y1, icl32f x2, icl32f y2) |
adds a line (intnerally represented by bounding rectangle) | |
void | line (const Point32f &a, const Point32f &b) |
adds a line (intnerally represented by bounding rectangle) | |
void | sym (char type, icl32f x, icl32f y) |
adds a symbol (supported types are +*x and .) | |
void | sym (char type, const Point32f &p) |
adds a symbol (supported types are +*x and .) | |
void | text (icl32f x, icl32f y, const std::string &text) |
adds text | |
void | text (const Point32f &pos, const std::string &text) |
adds text | |
void | point (const Point32f &p) |
adds a point (internally handles as a sym of type '.') | |
template<class Iterator > | |
void | points (Iterator begin, Iterator end) |
adds points (data is in order [x1,y1,x2,y2] | |
void | points (const std::vector< Point32f > &ps) |
adds points from given float vector | |
void | points (const std::vector< Point > &ps) |
adds points from given vector of Points | |
template<class Iterator > | |
void | polygon (Iterator begin, Iterator end) |
template based creation of a polygon | |
void | polygon (const std::vector< Point32f > &ps) |
adds polygon from given float vector | |
void | polygon (const std::vector< Point > &ps) |
adds polygon from given vector of Points | |
void | linewidth (float w) |
defines the linewidth | |
void | pointsize (float s) |
defines the point size | |
Protected Attributes | |
std::vector< Part > | parts |
internal part list |
Abstract class for visualization tasks.
The visualization class provides an interface for tools to provide visualization information. It's idea is to provide an easy interface -- it's implementation is rather slow, but completely neglegible for most applications;
Right now, this is a very simple interface which still needs to be extended
Right now, the following parts are supported. Color and Fill parts remain active untill the next color/fill part is put into the list
void icl::utils::VisualizationDescription::addPart | ( | const Part & | part | ) | [inline] |
adds a given part
void icl::utils::VisualizationDescription::addPart | ( | char | c, |
const Any & | content | ||
) | [inline] |
adds a given part
void icl::utils::VisualizationDescription::circle | ( | icl32f | cx, |
icl32f | cy, | ||
icl32f | radius | ||
) | [inline] |
adds a circle (intnerally handeled as ellipse)
void icl::utils::VisualizationDescription::clear | ( | ) | [inline] |
clears the list
void icl::utils::VisualizationDescription::color | ( | icl8u | r, |
icl8u | g, | ||
icl8u | b | ||
) | [inline] |
sets the current draw color (no alpha)
void icl::utils::VisualizationDescription::color | ( | icl8u | r, |
icl8u | g, | ||
icl8u | b, | ||
icl8u | a | ||
) | [inline] |
sets the current draw color (with alpha)
void icl::utils::VisualizationDescription::ellipse | ( | icl32f | x, |
icl32f | y, | ||
icl32f | width, | ||
icl32f | height | ||
) | [inline] |
add an ellipse
void icl::utils::VisualizationDescription::ellipse | ( | const Rect32f & | r | ) | [inline] |
add an ellipse
void icl::utils::VisualizationDescription::fill | ( | icl8u | r, |
icl8u | g, | ||
icl8u | b | ||
) | [inline] |
sets the current fill color (no alpha)
void icl::utils::VisualizationDescription::fill | ( | icl8u | r, |
icl8u | g, | ||
icl8u | b, | ||
icl8u | a | ||
) | [inline] |
sets the current fill color (with alpha)
const std::vector<Part>& icl::utils::VisualizationDescription::getParts | ( | ) | const [inline] |
returns the parts
void icl::utils::VisualizationDescription::line | ( | icl32f | x1, |
icl32f | y1, | ||
icl32f | x2, | ||
icl32f | y2 | ||
) | [inline] |
adds a line (intnerally represented by bounding rectangle)
void icl::utils::VisualizationDescription::line | ( | const Point32f & | a, |
const Point32f & | b | ||
) | [inline] |
adds a line (intnerally represented by bounding rectangle)
void icl::utils::VisualizationDescription::linewidth | ( | float | w | ) | [inline] |
defines the linewidth
VisualizationDescription icl::utils::VisualizationDescription::operator+ | ( | const VisualizationDescription & | other | ) | [inline] |
adds two descriptions
Internally the part-lists are just concatenated
VisualizationDescription& icl::utils::VisualizationDescription::operator+= | ( | const VisualizationDescription & | other | ) | [inline] |
adds another visualization description
Internally the part-lists are just concatenated
void icl::utils::VisualizationDescription::point | ( | const Point32f & | p | ) | [inline] |
adds a point (internally handles as a sym of type '.')
void icl::utils::VisualizationDescription::points | ( | Iterator | begin, |
Iterator | end | ||
) | [inline] |
adds points (data is in order [x1,y1,x2,y2]
void icl::utils::VisualizationDescription::points | ( | const std::vector< Point32f > & | ps | ) | [inline] |
adds points from given float vector
void icl::utils::VisualizationDescription::points | ( | const std::vector< Point > & | ps | ) | [inline] |
adds points from given vector of Points
void icl::utils::VisualizationDescription::pointsize | ( | float | s | ) | [inline] |
defines the point size
void icl::utils::VisualizationDescription::polygon | ( | Iterator | begin, |
Iterator | end | ||
) | [inline] |
template based creation of a polygon
void icl::utils::VisualizationDescription::polygon | ( | const std::vector< Point32f > & | ps | ) | [inline] |
adds polygon from given float vector
void icl::utils::VisualizationDescription::polygon | ( | const std::vector< Point > & | ps | ) | [inline] |
adds polygon from given vector of Points
void icl::utils::VisualizationDescription::rect | ( | icl32f | x, |
icl32f | y, | ||
icl32f | width, | ||
icl32f | height | ||
) | [inline] |
add a rectangle
void icl::utils::VisualizationDescription::rect | ( | const Rect32f & | r | ) | [inline] |
add a rectangle
void icl::utils::VisualizationDescription::sym | ( | char | type, |
icl32f | x, | ||
icl32f | y | ||
) | [inline] |
adds a symbol (supported types are +*x and .)
void icl::utils::VisualizationDescription::sym | ( | char | type, |
const Point32f & | p | ||
) | [inline] |
adds a symbol (supported types are +*x and .)
void icl::utils::VisualizationDescription::text | ( | icl32f | x, |
icl32f | y, | ||
const std::string & | text | ||
) | [inline] |
adds text
note that the text must be single lined
void icl::utils::VisualizationDescription::text | ( | const Point32f & | pos, |
const std::string & | text | ||
) | [inline] |
adds text
note that the text must be single lined
std::vector<Part> icl::utils::VisualizationDescription::parts [protected] |
internal part list