OSSIM - Open Source Software Image Map
Version 1.9.0 (20180803)
|
Class to draw fonts onto an image. More...
#include <ossimAnnotationFontObject.h>
Public Member Functions | |
ossimAnnotationFontObject () | |
ossimAnnotationFontObject (const ossimIpt &upperLeft, const ossimString &s, const ossimIpt &pixelSize=ossimIpt(12, 12), double rotation=0.0, const ossimDpt &scale=ossimDpt(1.0, 1.0), const ossimDpt &shear=ossimDpt(0.0, 0.0), unsigned char r=255, unsigned char g=255, unsigned char b=255) | |
ossimAnnotationFontObject (const ossimAnnotationFontObject &rhs) | |
virtual ossimObject * | dup () const |
virtual void | draw (ossimRgbImage &anImage) const |
virtual std::ostream & | print (std::ostream &out) const |
Generic print method. More... | |
virtual void | getBoundingRect (ossimDrect &rect) const |
virtual void | setString (const ossimString &s) |
virtual ossimString | getString () const |
virtual void | computeBoundingRect () |
virtual ossimAnnotationObject * | getNewClippedObject (const ossimDrect &rect) const |
virtual bool | intersects (const ossimDrect &rect) const |
virtual bool | isPointWithin (const ossimDpt &imagePoint) const |
virtual void | setFont (ossimFont *font) |
virtual void | setCenterPosition (const ossimIpt &position) |
virtual void | setUpperLeftPosition (const ossimIpt &position) |
virtual void | setPointSize (const ossimIpt &size) |
virtual void | setRotation (double rotation) |
virtual void | setScale (const ossimDpt &scale) |
virtual void | setShear (const ossimDpt &shear) |
virtual void | setGeometryInformation (const ossimFontInformation &info) |
virtual void | applyScale (double x, double y) |
![]() | |
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 | ~ossimAnnotationFontObject () |
void | setFontInfo () const |
![]() | |
virtual | ~ossimReferenced () |
Protected Attributes | |
ossimRefPtr< ossimFont > | theFont |
ossimIpt | thePosition |
ossimString | theString |
ossimIpt | thePixelSize |
double | theRotation |
double | theHorizontalScale |
double | theVerticalScale |
double | theHorizontalShear |
double | theVerticalShear |
ossimIrect | theBoundingRect |
![]() | |
ossim_uint8 | theRed |
ossim_uint8 | theGreen |
ossim_uint8 | theBlue |
ossim_uint8 | theThickness |
ossimString | theName |
ossim_uint32 | theId |
Friends | |
class | ossimGeoAnnotationFontObject |
Additional Inherited Members | |
![]() | |
static ossim_uint32 | getNextId () |
static void | restIdCounter () |
![]() | |
static ossim_uint32 | theIdCounter = 0 |
Class to draw fonts onto an image.
Definition at line 27 of file ossimAnnotationFontObject.h.
ossimAnnotationFontObject::ossimAnnotationFontObject | ( | ) |
Definition at line 16 of file ossimAnnotationFontObject.cpp.
References ossimIrect::makeNan(), setFontInfo(), and theBoundingRect.
Referenced by dup().
ossimAnnotationFontObject::ossimAnnotationFontObject | ( | const ossimIpt & | upperLeft, |
const ossimString & | s, | ||
const ossimIpt & | pixelSize = ossimIpt(12, 12) , |
||
double | rotation = 0.0 , |
||
const ossimDpt & | scale = ossimDpt(1.0, 1.0) , |
||
const ossimDpt & | shear = ossimDpt(0.0,0.0) , |
||
unsigned char | r = 255 , |
||
unsigned char | g = 255 , |
||
unsigned char | b = 255 |
||
) |
Definition at line 31 of file ossimAnnotationFontObject.cpp.
References computeBoundingRect(), ossimFont::getBoundingBox(), setFontInfo(), theBoundingRect, theFont, thePosition, and ossimIrect::ul().
ossimAnnotationFontObject::ossimAnnotationFontObject | ( | const ossimAnnotationFontObject & | rhs | ) |
Definition at line 63 of file ossimAnnotationFontObject.cpp.
References setFontInfo(), and theFont.
|
protectedvirtual |
Definition at line 80 of file ossimAnnotationFontObject.cpp.
References theFont.
|
virtual |
Implements ossimAnnotationObject.
Definition at line 363 of file ossimAnnotationFontObject.cpp.
References computeBoundingRect(), setFontInfo(), thePosition, ossimIpt::x, x, ossimIpt::y, and y.
Referenced by ossimGeoAnnotationFontObject::applyScale().
|
virtual |
Implements ossimAnnotationObject.
Definition at line 208 of file ossimAnnotationFontObject.cpp.
References ossimFont::getBoundingBox(), ossimIrect::height(), setFontInfo(), theBoundingRect, theFont, thePosition, ossimRefPtr< T >::valid(), ossimIrect::width(), ossimIpt::x, and ossimIpt::y.
Referenced by ossimMapCompositionSource::addGeographicBottomGridLabels(), ossimMapCompositionSource::addGeographicLeftGridLabels(), ossimMapCompositionSource::addGeographicRightGridLabels(), ossimMapCompositionSource::addMeterGridLabels(), ossimMapCompositionSource::addTitle(), applyScale(), ossimGeoAnnotationFontObject::computeBoundingRect(), ossimAnnotationFontObject(), and ossimGeoAnnotationFontObject::transform().
|
virtual |
Implements ossimAnnotationObject.
Definition at line 85 of file ossimAnnotationFontObject.cpp.
References ossimIrect::clipToRect(), ossimFont::getBoundingBox(), ossimImageData::getBuf(), ossimFont::getBufferRect(), ossimRgbImage::getImageData(), ossimImageData::getImageRectangle(), ossimImageData::getNumberOfBands(), ossimIrect::hasNans(), ossimIrect::height(), ossimIrect::intersects(), ossimFont::rasterize(), ossimFont::setClippingBox(), setFontInfo(), ossimAnnotationObject::theBlue, theBoundingRect, theFont, ossimAnnotationObject::theGreen, thePixelSize, ossimAnnotationObject::theRed, ossimIrect::ul(), ossimRefPtr< T >::valid(), ossimIrect::width(), ossimIpt::x, and ossimIpt::y.
Referenced by ossimGeoAnnotationFontObject::draw().
|
virtual |
Reimplemented from ossimObject.
Definition at line 373 of file ossimAnnotationFontObject.cpp.
References ossimAnnotationFontObject().
Referenced by getNewClippedObject().
|
virtual |
Implements ossimAnnotationObject.
Definition at line 203 of file ossimAnnotationFontObject.cpp.
References theBoundingRect.
Referenced by ossimChipperUtil::addCrossHairAnnotation(), ossimMapCompositionSource::addGeographicBottomGridLabels(), ossimMapCompositionSource::addGeographicLeftGridLabels(), ossimMapCompositionSource::addGeographicRightGridLabels(), ossimMapCompositionSource::addMeterGridLabels(), and ossimGeoAnnotationFontObject::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 280 of file ossimAnnotationFontObject.cpp.
References dup(), and intersects().
|
virtual |
Definition at line 275 of file ossimAnnotationFontObject.cpp.
References theString.
Referenced by ossimGeoAnnotationFontObject::saveState().
|
virtual |
Implements ossimAnnotationObject.
Definition at line 290 of file ossimAnnotationFontObject.cpp.
References ossimDrect::intersects(), and theBoundingRect.
Referenced by getNewClippedObject(), and ossimGeoAnnotationFontObject::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 226 of file ossimAnnotationFontObject.cpp.
References ossimIrect::pointWithin(), and theBoundingRect.
|
virtual |
Generic print method.
Derived classes should re-implement as they see fit.
Reimplemented from ossimAnnotationObject.
Definition at line 185 of file ossimAnnotationFontObject.cpp.
References ossimFont::getFamilyName(), ossimFont::getStyleName(), theBoundingRect, theFont, theHorizontalScale, theHorizontalShear, thePosition, theRotation, theString, theVerticalScale, theVerticalShear, and ossimRefPtr< T >::valid().
|
virtual |
Definition at line 241 of file ossimAnnotationFontObject.cpp.
References ossimIrect::midPoint(), theBoundingRect, thePosition, and ossimIrect::ul().
Referenced by ossimMapCompositionSource::addGeographicBottomGridLabels(), ossimMapCompositionSource::addGeographicLeftGridLabels(), ossimMapCompositionSource::addGeographicRightGridLabels(), ossimMapCompositionSource::addMeterGridLabels(), ossimMapCompositionSource::addTitle(), and ossimGeoAnnotationFontObject::transform().
|
virtual |
Definition at line 231 of file ossimAnnotationFontObject.cpp.
References ossimFontFactoryRegistry::getDefaultFont(), ossimFontFactoryRegistry::instance(), and theFont.
Referenced by ossimMapCompositionSource::addGeographicBottomGridLabels(), ossimMapCompositionSource::addGeographicLeftGridLabels(), ossimMapCompositionSource::addGeographicRightGridLabels(), ossimMapCompositionSource::addMeterGridLabels(), ossimMapCompositionSource::addTitle(), ossimGeoAnnotationFontObject::loadState(), ossimGeoAnnotationFontObject::ossimGeoAnnotationFontObject(), and ossimGeoAnnotationFontObject::setFont().
|
protected |
Definition at line 257 of file ossimAnnotationFontObject.cpp.
References ossimFont::setHorizontalVerticalShear(), ossimFont::setPixelSize(), ossimFont::setRotation(), ossimFont::setScale(), ossimFont::setString(), theFont, theHorizontalScale, theHorizontalShear, thePixelSize, theRotation, theString, theVerticalScale, theVerticalShear, ossimRefPtr< T >::valid(), ossimIpt::x, and ossimIpt::y.
Referenced by applyScale(), computeBoundingRect(), draw(), ossimAnnotationFontObject(), setGeometryInformation(), setPointSize(), setRotation(), setScale(), and setShear().
|
virtual |
Definition at line 345 of file ossimAnnotationFontObject.cpp.
References ossimFont::getBoundingBox(), setFontInfo(), theBoundingRect, theFont, theHorizontalScale, theHorizontalShear, thePixelSize, ossimFontInformation::thePointSize, thePosition, theRotation, ossimFontInformation::theRotation, ossimFontInformation::theScale, ossimFontInformation::theShear, theVerticalScale, theVerticalShear, ossimIrect::ul(), ossimRefPtr< T >::valid(), ossimDpt::x, and ossimDpt::y.
Referenced by ossimMapCompositionSource::addGeographicBottomGridLabels(), ossimMapCompositionSource::addGeographicLeftGridLabels(), ossimMapCompositionSource::addGeographicRightGridLabels(), ossimMapCompositionSource::addMeterGridLabels(), ossimMapCompositionSource::addTitle(), and ossimGeoAnnotationFontObject::loadState().
|
virtual |
Definition at line 295 of file ossimAnnotationFontObject.cpp.
References ossimFont::getBoundingBox(), setFontInfo(), size, theBoundingRect, theFont, thePixelSize, thePosition, ossimIrect::ul(), and ossimRefPtr< T >::valid().
Referenced by ossimChipperUtil::addCrossHairAnnotation(), and ossimGeoAnnotationFontObject::setPointSize().
|
virtual |
Definition at line 307 of file ossimAnnotationFontObject.cpp.
References ossimFont::getBoundingBox(), setFontInfo(), theBoundingRect, theFont, thePosition, theRotation, ossimIrect::ul(), and ossimRefPtr< T >::valid().
Referenced by ossimGeoAnnotationFontObject::setRotation().
|
virtual |
Definition at line 319 of file ossimAnnotationFontObject.cpp.
References ossimFont::getBoundingBox(), setFontInfo(), theBoundingRect, theFont, theHorizontalScale, thePosition, theVerticalScale, ossimIrect::ul(), ossimRefPtr< T >::valid(), ossimDpt::x, and ossimDpt::y.
Referenced by ossimChipperUtil::addCrossHairAnnotation(), and ossimGeoAnnotationFontObject::setScale().
|
virtual |
Definition at line 332 of file ossimAnnotationFontObject.cpp.
References ossimFont::getBoundingBox(), setFontInfo(), theBoundingRect, theFont, theHorizontalShear, thePosition, theVerticalShear, ossimIrect::ul(), ossimRefPtr< T >::valid(), ossimDpt::x, and ossimDpt::y.
Referenced by ossimGeoAnnotationFontObject::setShear().
|
virtual |
Definition at line 270 of file ossimAnnotationFontObject.cpp.
References theString.
Referenced by ossimChipperUtil::addCrossHairAnnotation(), and ossimGeoAnnotationFontObject::loadState().
|
virtual |
Definition at line 249 of file ossimAnnotationFontObject.cpp.
References theBoundingRect, thePosition, and ossimIrect::ul().
Referenced by ossimChipperUtil::addCrossHairAnnotation().
|
friend |
Definition at line 31 of file ossimAnnotationFontObject.h.
|
protected |
Definition at line 78 of file ossimAnnotationFontObject.h.
Referenced by computeBoundingRect(), draw(), getBoundingRect(), intersects(), isPointWithin(), ossimAnnotationFontObject(), print(), setCenterPosition(), setGeometryInformation(), setPointSize(), setRotation(), setScale(), setShear(), and setUpperLeftPosition().
|
mutableprotected |
Definition at line 69 of file ossimAnnotationFontObject.h.
Referenced by computeBoundingRect(), draw(), ossimAnnotationFontObject(), print(), setFont(), setFontInfo(), setGeometryInformation(), setPointSize(), setRotation(), setScale(), setShear(), and ~ossimAnnotationFontObject().
|
protected |
Definition at line 74 of file ossimAnnotationFontObject.h.
Referenced by print(), setFontInfo(), setGeometryInformation(), and setScale().
|
protected |
Definition at line 76 of file ossimAnnotationFontObject.h.
Referenced by print(), setFontInfo(), setGeometryInformation(), and setShear().
|
protected |
Definition at line 72 of file ossimAnnotationFontObject.h.
Referenced by draw(), setFontInfo(), setGeometryInformation(), and setPointSize().
|
protected |
Definition at line 70 of file ossimAnnotationFontObject.h.
Referenced by applyScale(), computeBoundingRect(), ossimAnnotationFontObject(), print(), setCenterPosition(), setGeometryInformation(), setPointSize(), setRotation(), setScale(), setShear(), and setUpperLeftPosition().
|
protected |
Definition at line 73 of file ossimAnnotationFontObject.h.
Referenced by print(), setFontInfo(), setGeometryInformation(), and setRotation().
|
protected |
Definition at line 71 of file ossimAnnotationFontObject.h.
Referenced by getString(), print(), setFontInfo(), and setString().
|
protected |
Definition at line 75 of file ossimAnnotationFontObject.h.
Referenced by print(), setFontInfo(), setGeometryInformation(), and setScale().
|
protected |
Definition at line 77 of file ossimAnnotationFontObject.h.
Referenced by print(), setFontInfo(), setGeometryInformation(), and setShear().