Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

EggMakeFont Class Reference

#include <eggMakeFont.h>

Inheritance diagram for EggMakeFont:

EggWriter EggBase WithOutputFile ProgramBase List of all members.

Public Member Functions

 EggMakeFont ()
void run ()

Protected Member Functions

virtual bool handle_args (Args &args)
bool ns_dispatch_dimensions (const string &opt, const string &arg)

Static Protected Member Functions

bool dispatch_dimensions (ProgramBase *self, const string &opt, const string &arg, void *)

Private Types

typedef pmap< int, PT(EggGroupEggDefs )

Private Member Functions

TexCoordd get_uv (double x, double y)
LPoint2d get_xy (double x, double y)
EggVertexmake_vertex (const LPoint2d &xy)
void copy_character (const CharPlacement &pl)
bool consider_scale_factor (double scale_factor)
void choose_scale_factor (double too_small, double too_large)
bool choose_scale_factor ()
void choose_image_size ()
void unsmooth_rgb (PNMImage &image)
string expand_hyphen (const string &str)

Private Attributes

Filename _output_image_filename
Filename _input_font_filename
bool _got_output_size
Colorf _fg
Colorf _bg
bool _use_alpha
int _output_xsize
int _output_ysize
int _output_zsize
double _buffer_pixels
double _poly_pixels
bool _got_scale_factor
double _scale_factor
bool _no_reduce
double _gaussian_radius
double _ds
double _scale
double _ppu
bool _get_all
string _only_chars
bool _small_caps
double _small_caps_scale
FontFile_font
EggDefs _egg_defs
CharLayout _layout
int _working_xsize
int _working_ysize
int _working_buffer_pixels
double _working_poly_pixels
PNMImage _output_image
EggVertexPool_vpool
EggGroup_group
EggTexture_tref

Member Typedef Documentation

typedef pmap<int, PT(EggGroup) EggMakeFont::EggDefs) [private]
 

Definition at line 94 of file eggMakeFont.h.


Constructor & Destructor Documentation

EggMakeFont::EggMakeFont  ) 
 

Definition at line 40 of file eggMakeFont.cxx.

References _bg, _buffer_pixels, _ds, _fg, _gaussian_radius, _get_all, _got_output_size, _got_scale_factor, _no_reduce, _only_chars, _output_image_filename, _output_xsize, _output_ysize, _output_zsize, _poly_pixels, _scale, _scale_factor, _small_caps, _small_caps_scale, ProgramBase::add_option(), ProgramBase::add_runline(), ProgramBase::clear_runlines(), ProgramBase::dispatch_color(), dispatch_dimensions(), ProgramBase::dispatch_double(), ProgramBase::dispatch_filename(), ProgramBase::dispatch_int(), ProgramBase::dispatch_none(), ProgramBase::dispatch_string(), false, NULL, ProgramBase::set_program_description(), and true.


Member Function Documentation

void EggMakeFont::choose_image_size  )  [private]
 

Definition at line 543 of file eggMakeFont.cxx.

References _output_xsize, _output_ysize, _scale_factor, and choose_scale_factor().

Referenced by run().

bool EggMakeFont::choose_scale_factor  )  [private]
 

Definition at line 501 of file eggMakeFont.cxx.

References consider_scale_factor().

Referenced by choose_image_size(), choose_scale_factor(), and run().

void EggMakeFont::choose_scale_factor double  too_small,
double  too_large
[private]
 

Definition at line 472 of file eggMakeFont.cxx.

References choose_scale_factor(), and consider_scale_factor().

bool EggMakeFont::consider_scale_factor double  scale_factor  )  [private]
 

Definition at line 439 of file eggMakeFont.cxx.

References _buffer_pixels, CharBitmap::_character, _font, _layout, _output_xsize, _output_ysize, _scale_factor, _small_caps, _working_buffer_pixels, _working_xsize, _working_ysize, FontFile::get_char(), FontFile::get_num_chars(), CharLayout::place_character(), CharLayout::reset(), and scale_factor.

Referenced by choose_scale_factor(), and run().

void EggMakeFont::copy_character const CharPlacement pl  )  [private]
 

Definition at line 305 of file eggMakeFont.cxx.

References CharBitmap::_block, CharPlacement::_bm, CharBitmap::_character, CharBitmap::_dx, CharBitmap::_dy, _egg_defs, _fg, CharBitmap::_hoff, _output_image, _small_caps, _small_caps_scale, _tref, CharBitmap::_voff, _working_poly_pixels, CharPlacement::_x, CharPlacement::_y, EggPrimitive::add_vertex(), b, format_string(), CharBitmap::get_height(), get_uv(), CharBitmap::get_width(), get_xy(), PNMImageHeader::has_alpha(), height, make_vertex(), ProgramBase::PT(), PNMImage::set_alpha(), EggPrimitive::set_texture(), EggAttributes::set_uv(), PNMImage::set_xel(), TexCoordd, width, x, and y.

Referenced by run().

bool EggMakeFont::dispatch_dimensions ProgramBase self,
const string &  opt,
const string &  arg,
void
[static, protected]
 

Definition at line 222 of file eggMakeFont.cxx.

References EggBase::as_writer(), and ns_dispatch_dimensions().

Referenced by EggMakeFont().

string EggMakeFont::expand_hyphen const string &  str  )  [private]
 

Definition at line 612 of file eggMakeFont.cxx.

References a, size_t, and z.

Referenced by run().

TexCoordd EggMakeFont::get_uv double  x,
double  y
[private]
 

Definition at line 268 of file eggMakeFont.cxx.

References _working_xsize, _working_ysize, TexCoordd, x, and y.

Referenced by copy_character().

LPoint2d EggMakeFont::get_xy double  x,
double  y
[private]
 

Definition at line 281 of file eggMakeFont.cxx.

References _font, _ppu, FontFile::get_hppp(), FontFile::get_vppp(), x, and y.

Referenced by copy_character().

bool EggMakeFont::handle_args Args args  )  [protected, virtual]
 

Reimplemented from EggWriter.

Definition at line 204 of file eggMakeFont.cxx.

References _input_font_filename, EggWriter::handle_args(), and nout.

EggVertex * EggMakeFont::make_vertex const LPoint2d &  xy  )  [private]
 

Definition at line 292 of file eggMakeFont.cxx.

References EggBase::_coordinate_system, _vpool, and EggVertexPool::make_new_vertex().

Referenced by copy_character(), and run().

bool EggMakeFont::ns_dispatch_dimensions const string &  opt,
const string &  arg
[protected]
 

Definition at line 235 of file eggMakeFont.cxx.

References _output_xsize, _output_ysize, _output_zsize, nout, string_to_int(), tokenize(), and vector_string.

Referenced by dispatch_dimensions().

void EggMakeFont::run  ) 
 

Definition at line 642 of file eggMakeFont.cxx.

References _bg, EggBase::_data, _ds, _egg_defs, _fg, _font, _gaussian_radius, _get_all, _got_output_size, _got_scale_factor, _group, _input_font_filename, _layout, _only_chars, _output_image, _output_image_filename, _output_xsize, _output_ysize, _output_zsize, CharLayout::_placements, _poly_pixels, _ppu, _scale, _scale_factor, _tref, _use_alpha, _vpool, _working_poly_pixels, _working_xsize, _working_ysize, EggPrimitive::add_vertex(), PNMImage::alpha_fill(), choose_image_size(), choose_scale_factor(), PNMImage::clear(), consider_scale_factor(), copy_character(), Filename::empty(), expand_hyphen(), EggTexture::F_alpha, EggTexture::F_luminance, EggTexture::F_luminance_alpha, EggTexture::F_rgb, EggTexture::F_rgba, EggTexture::F_unspecified, PNMImage::fill(), format, EggTexture::Format, PNMImage::gaussian_filter_from(), FontFile::get_ds(), FontFile::get_num_chars(), WithOutputFile::get_output_filename(), PNMImageHeader::has_alpha(), WithOutputFile::has_output_filename(), make_vertex(), nout, FontFile::read(), Filename::set_extension(), EggTexture::set_format(), EggGroup::set_switch_flag(), EggGroup::set_switch_fps(), FontFile::sort_chars_by_height(), unsmooth_rgb(), upcase(), PNMImage::write(), and EggWriter::write_egg_file().

Referenced by main().

void EggMakeFont::unsmooth_rgb PNMImage image  )  [private]
 

Definition at line 592 of file eggMakeFont.cxx.

References alpha, image, x, and y.

Referenced by run().


Member Data Documentation

Colorf EggMakeFont::_bg [private]
 

Definition at line 76 of file eggMakeFont.h.

Referenced by EggMakeFont(), and run().

double EggMakeFont::_buffer_pixels [private]
 

Definition at line 79 of file eggMakeFont.h.

Referenced by consider_scale_factor(), and EggMakeFont().

double EggMakeFont::_ds [private]
 

Definition at line 85 of file eggMakeFont.h.

Referenced by EggMakeFont(), and run().

EggDefs EggMakeFont::_egg_defs [private]
 

Definition at line 95 of file eggMakeFont.h.

Referenced by copy_character(), and run().

Colorf EggMakeFont::_fg [private]
 

Definition at line 76 of file eggMakeFont.h.

Referenced by copy_character(), EggMakeFont(), and run().

FontFile* EggMakeFont::_font [private]
 

Definition at line 93 of file eggMakeFont.h.

Referenced by consider_scale_factor(), get_xy(), and run().

double EggMakeFont::_gaussian_radius [private]
 

Definition at line 84 of file eggMakeFont.h.

Referenced by EggMakeFont(), and run().

bool EggMakeFont::_get_all [private]
 

Definition at line 88 of file eggMakeFont.h.

Referenced by EggMakeFont(), and run().

bool EggMakeFont::_got_output_size [private]
 

Definition at line 75 of file eggMakeFont.h.

Referenced by EggMakeFont(), and run().

bool EggMakeFont::_got_scale_factor [private]
 

Definition at line 81 of file eggMakeFont.h.

Referenced by EggMakeFont(), and run().

EggGroup* EggMakeFont::_group [private]
 

Definition at line 105 of file eggMakeFont.h.

Referenced by run().

Filename EggMakeFont::_input_font_filename [private]
 

Definition at line 74 of file eggMakeFont.h.

Referenced by handle_args(), and run().

CharLayout EggMakeFont::_layout [private]
 

Definition at line 97 of file eggMakeFont.h.

Referenced by consider_scale_factor(), and run().

bool EggMakeFont::_no_reduce [private]
 

Definition at line 83 of file eggMakeFont.h.

Referenced by EggMakeFont().

string EggMakeFont::_only_chars [private]
 

Definition at line 89 of file eggMakeFont.h.

Referenced by EggMakeFont(), and run().

PNMImage EggMakeFont::_output_image [private]
 

Definition at line 102 of file eggMakeFont.h.

Referenced by copy_character(), and run().

Filename EggMakeFont::_output_image_filename [private]
 

Definition at line 73 of file eggMakeFont.h.

Referenced by EggMakeFont(), and run().

int EggMakeFont::_output_xsize [private]
 

Definition at line 78 of file eggMakeFont.h.

Referenced by choose_image_size(), consider_scale_factor(), EggMakeFont(), ns_dispatch_dimensions(), and run().

int EggMakeFont::_output_ysize [private]
 

Definition at line 78 of file eggMakeFont.h.

Referenced by choose_image_size(), consider_scale_factor(), EggMakeFont(), ns_dispatch_dimensions(), and run().

int EggMakeFont::_output_zsize [private]
 

Definition at line 78 of file eggMakeFont.h.

Referenced by EggMakeFont(), ns_dispatch_dimensions(), and run().

double EggMakeFont::_poly_pixels [private]
 

Definition at line 80 of file eggMakeFont.h.

Referenced by EggMakeFont(), and run().

double EggMakeFont::_ppu [private]
 

Definition at line 87 of file eggMakeFont.h.

Referenced by get_xy(), and run().

double EggMakeFont::_scale [private]
 

Definition at line 86 of file eggMakeFont.h.

Referenced by EggMakeFont(), and run().

double EggMakeFont::_scale_factor [private]
 

Definition at line 82 of file eggMakeFont.h.

Referenced by choose_image_size(), consider_scale_factor(), EggMakeFont(), and run().

bool EggMakeFont::_small_caps [private]
 

Definition at line 90 of file eggMakeFont.h.

Referenced by consider_scale_factor(), copy_character(), and EggMakeFont().

double EggMakeFont::_small_caps_scale [private]
 

Definition at line 91 of file eggMakeFont.h.

Referenced by copy_character(), and EggMakeFont().

EggTexture* EggMakeFont::_tref [private]
 

Definition at line 106 of file eggMakeFont.h.

Referenced by copy_character(), and run().

bool EggMakeFont::_use_alpha [private]
 

Definition at line 77 of file eggMakeFont.h.

Referenced by run().

EggVertexPool* EggMakeFont::_vpool [private]
 

Definition at line 104 of file eggMakeFont.h.

Referenced by make_vertex(), and run().

int EggMakeFont::_working_buffer_pixels [private]
 

Definition at line 99 of file eggMakeFont.h.

Referenced by consider_scale_factor().

double EggMakeFont::_working_poly_pixels [private]
 

Definition at line 100 of file eggMakeFont.h.

Referenced by copy_character(), and run().

int EggMakeFont::_working_xsize [private]
 

Definition at line 98 of file eggMakeFont.h.

Referenced by consider_scale_factor(), get_uv(), and run().

int EggMakeFont::_working_ysize [private]
 

Definition at line 98 of file eggMakeFont.h.

Referenced by consider_scale_factor(), get_uv(), and run().


The documentation for this class was generated from the following files:
Generated on Fri Apr 18 01:00:51 2003 for Panda-Tool by doxygen1.3