/usr/include/ossim/font/ossimGdBitmapFont.h is in libossim-dev 1.8.16-3+b1.
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 | //*******************************************************************
//
// License: See top level LICENSE.txt file.
//
// Author: Garrett Potts
// Description:
//
//********************************************************************
// $Id: ossimGdBitmapFont.h 9968 2006-11-29 14:01:53Z gpotts $
#ifndef ossimGdBitmapFont_HEADER
#define ossimGdBitmapFont_HEADER
#include <ossim/font/ossimFont.h>
struct ossimGdFont
{
/* # of characters in font */
int nchars;
/* First character is numbered... (usually 32 = space) */
int offset;
/* Character width and height */
int w;
int h;
/* Font data; array of characters, one row after another.
Easily included in code, also easily loaded from
data files. */
char *data;
};
typedef ossimGdFont* ossimGdFontPtr;
/*!
* This is a wrapper for the gd library fonts.
* Note that this class will currently only support scaling. It will not support
* any other affine operation.
*/
class ossimGdBitmapFont : public ossimFont
{
public:
ossimGdBitmapFont(const ossimString& familyName,
const ossimString& styleName,
const ossimGdFont* gdFontPtr);
ossimGdBitmapFont(const ossimGdBitmapFont& rhs);
virtual ~ossimGdBitmapFont();
virtual ossimObject* dup()const
{
return new ossimGdBitmapFont(*this);
}
virtual const ossim_uint8* getBuf()const
{
return theOutputBuffer;
}
/*!
* Will return an internal buffer for rasterizing and will
*/
virtual const ossim_uint8* rasterize();
virtual void getBoundingBox(ossimIrect& box);
bool isFixed()const
{
return true;
}
virtual void getFixedSizes(vector<ossimIpt>& sizes)const;
protected:
const ossimGdFont* theGdFontPtr;
long theBufferSize;
ossim_uint8* theOutputBuffer;
/*!
* This will take into consideration the point size along
* the horizontal and vertical and also the scale
* values. So the actual scale will be:
*
* Scale*(pointSize/fixedSize);
*/
void getActualScale(ossimDpt& scales)const;
void rasterizeNormal();
void allocateBuffer();
TYPE_DATA
};
#endif
|