00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef GEOMTEXTGLYPH_H
00016 #define GEOMTEXTGLYPH_H
00017
00018 #include "pandabase.h"
00019 #include "geom.h"
00020
00021 #ifdef HAVE_FREETYPE
00022
00023 #include "dynamicTextGlyph.h"
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034 class EXPCL_PANDA_TEXT GeomTextGlyph : public Geom {
00035 public:
00036 GeomTextGlyph(DynamicTextGlyph *glyph,
00037 const GeomVertexData *data);
00038 GeomTextGlyph(const GeomVertexData *data);
00039 GeomTextGlyph(const GeomTextGlyph ©);
00040 void operator = (const GeomTextGlyph ©);
00041 virtual ~GeomTextGlyph();
00042 ALLOC_DELETED_CHAIN(GeomTextGlyph);
00043
00044 virtual Geom *make_copy() const;
00045 virtual bool copy_primitives_from(const Geom *other);
00046 void count_geom(const Geom *other);
00047
00048 virtual void output(ostream &out) const;
00049 virtual void write(ostream &out, int indent_level = 0) const;
00050
00051 private:
00052 typedef pvector< PT(DynamicTextGlyph) > Glyphs;
00053 Glyphs _glyphs;
00054
00055 public:
00056 static void register_with_read_factory();
00057 static TypedWritable *make_GeomTextGlyph(const FactoryParams ¶ms);
00058
00059 PUBLISHED:
00060 static TypeHandle get_class_type() {
00061 return _type_handle;
00062 }
00063 public:
00064 static void init_type() {
00065 Geom::init_type();
00066 register_type(_type_handle, "GeomTextGlyph",
00067 Geom::get_class_type());
00068 }
00069 virtual TypeHandle get_type() const {
00070 return get_class_type();
00071 }
00072 virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00073
00074 private:
00075 static TypeHandle _type_handle;
00076 };
00077
00078 #include "geomTextGlyph.I"
00079
00080 #else // HAVE_FREETYPE
00081
00082
00083 typedef Geom GeomTextGlyph;
00084
00085 #endif // HAVE_FREETYPE
00086
00087 #endif // GEOMTEXTGLYPH_H