OSSIM - Open Source Software Image Map
Version 1.9.0 (20180803)
|
#include <ossimAnnotationPolyObject.h>
Public Member Functions | |
ossimAnnotationPolyObject (bool enableFill=false, ossim_uint8 r=255, ossim_uint8 g=255, ossim_uint8 b=255, ossim_uint8 thickness=1) | |
ossimAnnotationPolyObject (const vector< ossimDpt > &imagePts, bool enableFill=false, ossim_uint8 r=255, ossim_uint8 g=255, ossim_uint8 b=255, ossim_uint8 thickness=1) | |
ossimAnnotationPolyObject (const ossimAnnotationPolyObject &rhs) | |
ossimObject * | dup () const |
virtual void | applyScale (double x, double y) |
virtual void | draw (ossimRgbImage &anImage) const |
virtual bool | intersects (const ossimDrect &rect) const |
virtual ossimAnnotationObject * | getNewClippedObject (const ossimDrect &rect) const |
virtual std::ostream & | print (std::ostream &out) const |
Generic print method. More... | |
virtual void | getBoundingRect (ossimDrect &rect) const |
virtual void | addPoint (const ossimDpt &pt) |
virtual void | setPolygon (const vector< ossimDpt > &imagePoints) |
virtual void | setPolygon (const ossimPolygon &polygon) |
virtual void | setPolygon (const ossimIrect &rect) |
virtual void | setPolygon (const ossimDrect &rect) |
virtual void | computeBoundingRect () |
virtual bool | isPointWithin (const ossimDpt &imagePoint) const |
const ossimPolygon & | getPolygon () const |
ossimPolygon & | getPolygon () |
virtual void | setFillFlag (bool flag) |
![]() | |
virtual | ~ossimAnnotationObject () |
ossimAnnotationObject (ossim_uint8 r=255, ossim_uint8 g=255, ossim_uint8 b=255, ossim_uint8 thickness=1) | |
virtual void | applyScale (const ossimDpt &scale) |
virtual ossimDrect | getBoundingRect () const |
virtual void | setColor (ossim_uint8 r, ossim_uint8 g, ossim_uint8 b) |
void | getColor (ossim_uint8 &r, ossim_uint8 &g, ossim_uint8 &b) const |
ossim_uint8 | getThickness () const |
virtual void | setThickness (ossim_uint8 thickness) |
virtual bool | saveState (ossimKeywordlist &kwl, const char *prefix=0) const |
Saves the current state of this object. More... | |
virtual bool | loadState (const ossimKeywordlist &kwl, const char *prefix=0) |
Method to the load (recreate) the state of an object from a keyword list. More... | |
virtual ossimString | getName () const |
virtual void | setName (const ossimString &name) |
ossim_uint32 | getId () const |
virtual ossim_uint32 | setId () |
![]() | |
ossimObject () | |
virtual | ~ossimObject () |
virtual ossimString | getShortName () const |
virtual ossimString | getLongName () const |
virtual ossimString | getDescription () const |
virtual ossimString | getClassName () const |
virtual RTTItypeid | getType () const |
virtual bool | canCastTo (ossimObject *obj) const |
virtual bool | canCastTo (const RTTItypeid &id) const |
virtual bool | canCastTo (const ossimString &parentClassName) const |
virtual bool | isEqualTo (const ossimObject &obj, ossimCompareType compareType=OSSIM_COMPARE_FULL) const |
virtual void | accept (ossimVisitor &visitor) |
![]() | |
ossimReferenced () | |
ossimReferenced (const ossimReferenced &) | |
ossimReferenced & | operator= (const ossimReferenced &) |
void | ref () const |
increment the reference count by one, indicating that this object has another pointer which is referencing it. More... | |
void | unref () const |
decrement the reference count by one, indicating that a pointer to this object is referencing it. More... | |
void | unref_nodelete () const |
decrement the reference count by one, indicating that a pointer to this object is referencing it. More... | |
int | referenceCount () const |
Protected Member Functions | |
virtual | ~ossimAnnotationPolyObject () |
![]() | |
virtual | ~ossimReferenced () |
Protected Attributes | |
ossimPolygon | thePolygon |
ossimDrect | theBoundingRect |
bool | theFillEnabled |
![]() | |
ossim_uint8 | theRed |
ossim_uint8 | theGreen |
ossim_uint8 | theBlue |
ossim_uint8 | theThickness |
ossimString | theName |
ossim_uint32 | theId |
Additional Inherited Members | |
![]() | |
static ossim_uint32 | getNextId () |
static void | restIdCounter () |
![]() | |
static ossim_uint32 | theIdCounter = 0 |
Definition at line 17 of file ossimAnnotationPolyObject.h.
ossimAnnotationPolyObject::ossimAnnotationPolyObject | ( | bool | enableFill = false , |
ossim_uint8 | r = 255 , |
||
ossim_uint8 | g = 255 , |
||
ossim_uint8 | b = 255 , |
||
ossim_uint8 | thickness = 1 |
||
) |
Referenced by dup(), and getNewClippedObject().
ossimAnnotationPolyObject::ossimAnnotationPolyObject | ( | const vector< ossimDpt > & | imagePts, |
bool | enableFill = false , |
||
ossim_uint8 | r = 255 , |
||
ossim_uint8 | g = 255 , |
||
ossim_uint8 | b = 255 , |
||
ossim_uint8 | thickness = 1 |
||
) |
Definition at line 32 of file ossimAnnotationPolyObject.cpp.
References computeBoundingRect(), and thePolygon.
ossimAnnotationPolyObject::ossimAnnotationPolyObject | ( | const ossimAnnotationPolyObject & | rhs | ) |
Definition at line 46 of file ossimAnnotationPolyObject.cpp.
|
protectedvirtual |
Definition at line 60 of file ossimAnnotationPolyObject.cpp.
|
virtual |
Definition at line 283 of file ossimAnnotationPolyObject.cpp.
References ossimPolygon::addPoint(), and thePolygon.
|
virtual |
Implements ossimAnnotationObject.
Definition at line 64 of file ossimAnnotationPolyObject.cpp.
References computeBoundingRect(), thePolygon, x, and y.
Referenced by ossimGeoAnnotationPolyObject::applyScale().
|
virtual |
Implements ossimAnnotationObject.
Definition at line 308 of file ossimAnnotationPolyObject.cpp.
References theBoundingRect, and thePolygon.
Referenced by applyScale(), ossimGeoAnnotationPolyObject::computeBoundingRect(), ossimAnnotationPolyObject(), and ossimGeoAnnotationPolyObject::transform().
|
virtual |
Implements ossimAnnotationObject.
Definition at line 167 of file ossimAnnotationPolyObject.cpp.
References ossimPolygon::clipToRect(), ossimRgbImage::drawFilledPolygon(), ossimRgbImage::drawLine(), ossimRgbImage::getImageData(), ossimImageData::getImageRectangle(), ossimPolygon::getNumberOfVertices(), ossimPolygon::getVertexCount(), ossimDrect::hasNans(), ossimDrect::intersects(), ossimDrect::lr(), ossimRgbImage::setDrawColor(), ossimRgbImage::setThickness(), ossimAnnotationObject::theBlue, theBoundingRect, theFillEnabled, ossimAnnotationObject::theGreen, thePolygon, ossimAnnotationObject::theRed, ossimAnnotationObject::theThickness, ossimDrect::ul(), ossimDpt::x, and ossimDpt::y.
Referenced by ossimGeoAnnotationPolyObject::draw().
|
virtual |
Reimplemented from ossimObject.
Definition at line 55 of file ossimAnnotationPolyObject.cpp.
References ossimAnnotationPolyObject().
|
virtual |
Implements ossimAnnotationObject.
Definition at line 278 of file ossimAnnotationPolyObject.cpp.
References theBoundingRect.
Referenced by ossimGeoAnnotationPolyObject::getBoundingRect().
|
virtual |
Will allocate a new object that is clipped to the passed. in rect. Look at derived classes to see if the object is actually clipped or not. A new object is returned if it clips to the rect else NULL should be returned it doesn't clip.
Implements ossimAnnotationObject.
Definition at line 115 of file ossimAnnotationPolyObject.cpp.
References ossimPolygon::clipToRect(), ossimPolyLine::clipToRect(), ossimDrect::intersects(), ossimAnnotationPolyObject(), ossimAnnotationObject::theBlue, theBoundingRect, theFillEnabled, ossimAnnotationObject::theGreen, thePolygon, ossimAnnotationObject::theRed, and ossimAnnotationObject::theThickness.
Referenced by ossimGeoAnnotationPolyObject::getNewClippedObject().
const ossimPolygon & ossimAnnotationPolyObject::getPolygon | ( | ) | const |
Definition at line 318 of file ossimAnnotationPolyObject.cpp.
References thePolygon.
Referenced by ossimGeoAnnotationPolyObject::transform().
ossimPolygon & ossimAnnotationPolyObject::getPolygon | ( | ) |
Definition at line 323 of file ossimAnnotationPolyObject.cpp.
References thePolygon.
|
virtual |
Implements ossimAnnotationObject.
Definition at line 70 of file ossimAnnotationPolyObject.cpp.
References ossimDrect::clip(), ossimPolygon::clipToRect(), ossimPolygon::getVertexCount(), ossimDrect::hasNans(), ossimDrect::intersects(), theBoundingRect, theFillEnabled, and thePolygon.
Referenced by ossimGeoAnnotationPolyObject::intersects().
|
virtual |
This method allows you to pick an object. It will return true or false if the point falls somewhere on an object. Look at derived classes for further information.
Reimplemented from ossimAnnotationObject.
Definition at line 313 of file ossimAnnotationPolyObject.cpp.
References ossimDrect::pointWithin(), and theBoundingRect.
|
virtual |
Generic print method.
Derived classes should re-implement as they see fit.
Reimplemented from ossimAnnotationObject.
Definition at line 261 of file ossimAnnotationPolyObject.cpp.
References ossimPolygon::getVertexCount(), theBoundingRect, theFillEnabled, and thePolygon.
Referenced by ossimGeoAnnotationPolyObject::print().
|
virtual |
Definition at line 328 of file ossimAnnotationPolyObject.cpp.
References theFillEnabled.
Referenced by ossimGeoAnnotationPolyObject::setFillFlag().
|
virtual |
Definition at line 288 of file ossimAnnotationPolyObject.cpp.
References thePolygon.
Referenced by ossimGeoAnnotationPolyObject::loadState(), and ossimGeoAnnotationPolyObject::setPolygon().
|
virtual |
Definition at line 293 of file ossimAnnotationPolyObject.cpp.
References thePolygon.
|
virtual |
Definition at line 298 of file ossimAnnotationPolyObject.cpp.
References thePolygon.
|
virtual |
Definition at line 303 of file ossimAnnotationPolyObject.cpp.
References thePolygon.
|
protected |
Definition at line 74 of file ossimAnnotationPolyObject.h.
Referenced by computeBoundingRect(), draw(), getBoundingRect(), getNewClippedObject(), intersects(), isPointWithin(), and print().
|
protected |
Definition at line 75 of file ossimAnnotationPolyObject.h.
Referenced by draw(), getNewClippedObject(), intersects(), print(), and setFillFlag().
|
protected |
Definition at line 73 of file ossimAnnotationPolyObject.h.
Referenced by addPoint(), applyScale(), computeBoundingRect(), draw(), getNewClippedObject(), getPolygon(), intersects(), ossimAnnotationPolyObject(), print(), and setPolygon().