/usr/include/ossim/imaging/ossimAnnotationGdBitmapFont.h is in libossim-dev 2.2.2-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 | //*******************************************************************
//
// License: See top level LICENSE.txt file.
//
// Author: Garrett Potts (gpotts@imagelinks)
// Description:
//
//*************************************************************************
// $Id: ossimAnnotationGdBitmapFont.h 15766 2009-10-20 12:37:09Z gpotts $
#ifndef ossimAnnotationGdBitmapFont_HEADER
#define ossimAnnotationGdBitmapFont_HEADER
#include <ossim/imaging/ossimAnnotationObject.h>
#include <ossim/imaging/ossimGdFont.h>
#include <ossim/imaging/ossimGdFontExterns.h>
#include <ossim/base/ossimString.h>
/*!
* This is a class that will have hardcoded
* bitmap fonts. These fonts will be from
* the gd library.
*/
class OSSIMDLLEXPORT ossimAnnotationGdBitmapFont : public ossimAnnotationObject
{
public:
ossimAnnotationGdBitmapFont(const ossimDpt& position=ossimDpt(0,0),
const ossimString &text=ossimString(""),
ossimGdFontPtr font = ossimGdFontLarge,
unsigned char r = 255,
unsigned char g = 255,
unsigned char b = 255,
long thickness = 1);
ossimAnnotationGdBitmapFont(const ossimAnnotationGdBitmapFont& rhs);
virtual ossimObject* dup()const
{
return new ossimAnnotationGdBitmapFont(*this);
}
virtual void applyScale(double x, double y);
/*!
* Will draw the bitmap to the screen.
*/
virtual void draw(ossimRgbImage& anImage)const;
virtual bool intersects(const ossimDrect& rect)const
{
return rect.intersects(theBoundingRect);
}
virtual ossimAnnotationObject* getNewClippedObject(const ossimDrect& rect)const;
virtual std::ostream& print(std::ostream& out)const;
/*!
* Will retrieve the bound rectangle for this
* object.
*/
virtual void getBoundingRect(ossimDrect& rect)const;
/*!
* will compute the bounding rectangle.
*/
virtual void computeBoundingRect();
/*!
* Sets the current bitmap font to use.
*/
virtual void setFont(ossimGdFontPtr font);
/*!
* Set's the text string to render.
*/
virtual void setText(const ossimString& text);
/*!
* Set's the text string to render. This
* will assume that the x,y passed in is
* suppose to be the center. We will compute
* the upper left corner from this
*/
virtual void setCenterText(const ossimDpt& center,
const ossimString& text);
/*!
* Set's the text string to render. This
* will assume that the x,y passed in is
* suppose to be the upper left.
*/
virtual void setUpperLeftText(const ossimDpt& upperLeft,
const ossimString& text);
/*!
* Sets the center position of the string.
* will use this value to compute the actual
* origin of upper left corner of the first
* character. Make sure you have the text
* set before you call this method
*/
virtual void setCenterTextPosition(const ossimDpt& position);
/*!
* The actual upper left corner of the character.
*/
virtual void setUpperLeftTextPosition(const ossimDpt& position);
/*!
* Will determine if the point is within the font
*/
virtual bool isPointWithin(const ossimDpt& imagePoint)const;
protected:
virtual ~ossimAnnotationGdBitmapFont();
ossimGdFontPtr theFontPtr;
ossimString theText;
ossimDrect theBoundingRect;
/*!
* This position is suppose to be the upperleft
* corner of the first character in the string
*/
ossimDpt thePosition;
};
#endif
|