OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimGdBitmapFont.h
Go to the documentation of this file.
1 //*******************************************************************
2 //
3 // License: See top level LICENSE.txt file.
4 //
5 // Author: Garrett Potts
6 // Description:
7 //
8 //********************************************************************
9 // $Id: ossimGdBitmapFont.h 9968 2006-11-29 14:01:53Z gpotts $
10 #ifndef ossimGdBitmapFont_HEADER
11 #define ossimGdBitmapFont_HEADER
12 #include <ossim/font/ossimFont.h>
13 
15 {
16  /* # of characters in font */
17  int nchars;
18  /* First character is numbered... (usually 32 = space) */
19  int offset;
20  /* Character width and height */
21  int w;
22  int h;
23  /* Font data; array of characters, one row after another.
24  Easily included in code, also easily loaded from
25  data files. */
26  char *data;
27 };
29 
36 {
37 public:
38 
39  ossimGdBitmapFont(const ossimString& familyName,
40  const ossimString& styleName,
41  const ossimGdFont* gdFontPtr);
42 
44  virtual ~ossimGdBitmapFont();
45 
46  virtual ossimObject* dup()const
47  {
48  return new ossimGdBitmapFont(*this);
49  }
50  virtual const ossim_uint8* getBuf()const
51  {
52  return theOutputBuffer;
53  }
57  virtual const ossim_uint8* rasterize();
58  virtual void getBoundingBox(ossimIrect& box);
59  bool isFixed()const
60  {
61  return true;
62  }
63 
64  virtual void getFixedSizes(vector<ossimIpt>& sizes)const;
65 
66 protected:
68 
71 
79  void getActualScale(ossimDpt& scales)const;
80 
81  void rasterizeNormal();
82  void allocateBuffer();
83 
85 };
86 
87 #endif
ossimGdBitmapFont(const ossimString &familyName, const ossimString &styleName, const ossimGdFont *gdFontPtr)
virtual const ossim_uint8 * getBuf() const
virtual void getFixedSizes(vector< ossimIpt > &sizes) const
bool isFixed() const
ossimGdFont * ossimGdFontPtr
ossim_uint8 * theOutputBuffer
#define TYPE_DATA
Definition: ossimRtti.h:339
virtual ossimObject * dup() const
const ossimGdFont * theGdFontPtr
virtual const ossim_uint8 * rasterize()
virtual void getBoundingBox(ossimIrect &box)
void getActualScale(ossimDpt &scales) const
unsigned char ossim_uint8