00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef DYNAMICTEXTGLYPH_H
00020 #define DYNAMICTEXTGLYPH_H
00021
00022 #include "pandabase.h"
00023
00024 #ifdef HAVE_FREETYPE
00025
00026 #include "textGlyph.h"
00027
00028 class DynamicTextPage;
00029
00030
00031
00032
00033
00034
00035
00036
00037 class EXPCL_PANDA DynamicTextGlyph : public TextGlyph {
00038 public:
00039 INLINE DynamicTextGlyph(DynamicTextPage *page, int x, int y,
00040 int x_size, int y_size, int margin);
00041 INLINE DynamicTextGlyph(float advance);
00042 private:
00043 INLINE DynamicTextGlyph(const DynamicTextGlyph ©);
00044 INLINE void operator = (const DynamicTextGlyph ©);
00045
00046 public:
00047 virtual ~DynamicTextGlyph();
00048
00049 INLINE bool intersects(int x, int y, int x_size, int y_size) const;
00050 unsigned char *get_row(int y);
00051 void erase();
00052 void make_geom(int top, int left, float advance, float poly_margin,
00053 float tex_x_size, float tex_y_size,
00054 float font_pixels_per_unit, float tex_pixels_per_unit);
00055
00056 DynamicTextPage *_page;
00057 int _geom_count;
00058
00059 int _x, _y;
00060 int _x_size, _y_size;
00061 int _margin;
00062 };
00063
00064 #include "dynamicTextGlyph.I"
00065
00066 #endif // HAVE_FREETYPE
00067
00068 #endif