14#ifndef DYNAMICTEXTPAGE_H
15#define DYNAMICTEXTPAGE_H
33class EXPCL_PANDA_TEXT DynamicTextPage :
public Texture {
35 DynamicTextPage(DynamicTextFont *font,
int page_number);
37 DynamicTextGlyph *slot_glyph(
int character,
int x_size,
int y_size,
38 int margin, PN_stdfloat advance);
41 INLINE
const LVecBase2i &get_size()
const;
45 INLINE
bool is_empty()
const;
48 void fill_region(
int x,
int y,
int x_size,
int y_size,
const LColor &color);
51 int garbage_collect(DynamicTextFont *font);
53 bool find_hole(
int &x,
int &y,
int x_size,
int y_size)
const;
54 DynamicTextGlyph *find_overlap(
int x,
int y,
int x_size,
int y_size)
const;
56 typedef pvector< PT(DynamicTextGlyph) > Glyphs;
61 DynamicTextFont *_font;
67 static void init_type() {
70 Texture::get_class_type());
73 return get_class_type();
75 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
80 friend class DynamicTextFont;
Represents a texture object, which is typically a single 2-d image but may also represent a 1-d or 3-...
get_y_size
Returns the height of the texture image in texels.
get_x_size
Returns the width of the texture image in texels.
TypeHandle is the identifier used to differentiate C++ class types.
This is our own Panda specialization on the default STL vector.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.