00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef TEXTGLYPH_H
00016 #define TEXTGLYPH_H
00017
00018 #include "pandabase.h"
00019 #include "renderState.h"
00020 #include "referenceCount.h"
00021 #include "geom.h"
00022 #include "pointerTo.h"
00023 #include "dcast.h"
00024
00025
00026
00027
00028
00029
00030
00031 class EXPCL_PANDA_TEXT TextGlyph : public ReferenceCount {
00032 public:
00033 INLINE TextGlyph(int character);
00034 INLINE TextGlyph(int character, const Geom *geom,
00035 const RenderState *state, PN_stdfloat advance);
00036 INLINE TextGlyph(const TextGlyph ©);
00037 INLINE void operator = (const TextGlyph ©);
00038 virtual ~TextGlyph();
00039
00040 INLINE int get_character() const;
00041 INLINE PT(Geom) get_geom(Geom::UsageHint usage_hint) const;
00042 INLINE const RenderState *get_state() const;
00043 INLINE PN_stdfloat get_advance() const;
00044
00045 virtual bool is_whitespace() const;
00046
00047 protected:
00048 int _character;
00049 CPT(Geom) _geom;
00050 CPT(RenderState) _state;
00051 PN_stdfloat _advance;
00052 };
00053
00054 #include "textGlyph.I"
00055
00056 #endif