latest version v1.9 - last update 10 Apr 2010 |
graphicsPattern template class. More...
#include <ltiGraphicsPattern.h>
Classes | |
struct | less |
A comparator used for sorting patterns. More... | |
Public Member Functions | |
graphicsPattern () | |
virtual | ~graphicsPattern () |
const char * | getTypeName () const |
virtual void | clear ()=0 |
graphicsPattern & | copy (const graphicsPattern &other) |
graphicsPattern & | operator= (const graphicsPattern &other) |
bool | operator== (const graphicsPattern &other) const |
bool | operator!= (const graphicsPattern &other) const |
virtual object * | clone () const =0 |
virtual rectangle | getBoundingBox () const =0 |
virtual bool | write (ioHandler &handler, const bool complete=true) const |
virtual bool | read (ioHandler &handler, const bool complete=true) |
graphicsPattern template class.
It is the base class for all drawing patterns. The actual content of such a pattern, and if it is designed for lines or filled shapes, is defined in the subclass. Common property of all patterns include its bounding box, which is a rectangle that encloses all objects. Patterns may be binary, monochromatic, or colored. These classes are used by the drawer classes.
lti::graphicsPattern::graphicsPattern | ( | ) |
default constructor creates an empty pointList;
virtual lti::graphicsPattern::~graphicsPattern | ( | ) | [virtual] |
destructor
virtual void lti::graphicsPattern::clear | ( | ) | [pure virtual] |
Resets this pattern to its default state.
Implemented in lti::linePattern, and lti::fillPattern.
virtual object* lti::graphicsPattern::clone | ( | ) | const [pure virtual] |
create a clone of this pointList
Implemented in lti::linePattern, and lti::fillPattern.
graphicsPattern& lti::graphicsPattern::copy | ( | const graphicsPattern & | other | ) |
assigment operator.
copy the contents of other
in this object.
other | the source pointList to be copied. |
Reimplemented from lti::ioObject.
Reimplemented in lti::linePattern, and lti::fillPattern.
virtual rectangle lti::graphicsPattern::getBoundingBox | ( | ) | const [pure virtual] |
Returns the bounding box of this pattern.
Implemented in lti::linePattern, and lti::fillPattern.
const char* lti::graphicsPattern::getTypeName | ( | void | ) | const [inline, virtual] |
returns the name of this class: graphicsPattern
Reimplemented from lti::ioObject.
bool lti::graphicsPattern::operator!= | ( | const graphicsPattern & | other | ) | const [inline] |
comparison operator (alias for compareTo(other) != 0).
other | the pattern to be compared |
graphicsPattern& lti::graphicsPattern::operator= | ( | const graphicsPattern & | other | ) |
assigment operator (alias for copy(other)).
other | the pointList to be copied |
Reimplemented from lti::ioObject.
Reimplemented in lti::linePattern, and lti::fillPattern.
bool lti::graphicsPattern::operator== | ( | const graphicsPattern & | other | ) | const [inline] |
comparison operator (alias for compareTo(other) == 0).
other | the pattern to be compared |
virtual bool lti::graphicsPattern::read | ( | ioHandler & | handler, | |
const bool | complete = true | |||
) | [virtual] |
read the pattern from the given ioHandler
Reimplemented from lti::ioObject.
Reimplemented in lti::linePattern, and lti::fillPattern.
virtual bool lti::graphicsPattern::write | ( | ioHandler & | handler, | |
const bool | complete = true | |||
) | const [virtual] |
write the pattern to the given ioHandler
Reimplemented from lti::ioObject.
Reimplemented in lti::linePattern, and lti::fillPattern.