Font Class Reference

#include <font.h>

Collaboration diagram for Font:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Font ()
 Font (const char *fname, int index, int hlead=0, int vlead=1)
 ~Font ()
int load (const char *fname, int index, int hlead=0, int vlead=1)
int paint_text_box (Image_buffer8 *win, const char *text, int x, int y, int w, int h, int vert_lead=0, int pbreak=0)
int paint_text (Image_buffer8 *win, const char *text, int xoff, int yoff)
int paint_text (Image_buffer8 *win, const char *text, int textlen, int xoff, int yoff)
int paint_text_box_fixedwidth (Image_buffer8 *win, const char *text, int x, int y, int w, int h, int char_width, int vert_lead=0, int pbreak=0)
int paint_text_fixedwidth (Image_buffer8 *win, const char *text, int xoff, int yoff, int width)
int paint_text_fixedwidth (Image_buffer8 *win, const char *text, int textlen, int xoff, int yoff, int width)
int get_text_width (const char *text)
int get_text_width (const char *text, int textlen)
int get_text_height ()
int get_text_baseline ()
int draw_text (Image_buffer8 *win, int x, int y, const char *s)
int draw_text_box (Image_buffer8 *win, int x, int y, int w, int h, const char *s)
int center_text (Image_buffer8 *iwin, int x, int y, const char *s)

Private Member Functions

void calc_highlow ()

Private Attributes

int hor_lead
int ver_lead
Shape_filefont_shapes
DataSourcefont_data
char * font_buf
char * orig_font_buf
int highest
int lowest

Detailed Description

Definition at line 29 of file font.h.


Constructor & Destructor Documentation

Font::Font (  ) 

Definition at line 494 of file font.cc.

Font::Font ( const char *  fname,
int  index,
int  hlead = 0,
int  vlead = 1 
)

Definition at line 498 of file font.cc.

References load().

Here is the call graph for this function:

Font::~Font (  ) 

Definition at line 503 of file font.cc.

References font_data, font_shapes, and orig_font_buf.


Member Function Documentation

void Font::calc_highlow (  )  [private]

Definition at line 559 of file font.cc.

References font_shapes, Shape::get_frame(), Shape::get_num_frames(), highest, and lowest.

Referenced by load().

Here is the call graph for this function:

int Font::load ( const char *  fname,
int  index,
int  hlead = 0,
int  vlead = 1 
)

Definition at line 513 of file font.cc.

References calc_highlow(), font_buf, font_data, font_shapes, hor_lead, len, orig_font_buf, U7object::retrieve(), and ver_lead.

Referenced by Font().

Here is the call graph for this function:

int Font::paint_text_box ( Image_buffer8 win,
const char *  text,
int  x,
int  y,
int  w,
int  h,
int  vert_lead = 0,
int  pbreak = 0 
)

Definition at line 82 of file font.cc.

References Image_buffer::clear_clip(), height, len, Pass_space(), Pass_word(), Image_buffer::set_clip(), and width.

Referenced by draw_text_box(), and Fonts_vga_file::paint_text_box().

Here is the call graph for this function:

int Font::paint_text ( Image_buffer8 win,
const char *  text,
int  xoff,
int  yoff 
)

Definition at line 196 of file font.cc.

References Shape_frame::get_width(), and Shape_frame::paint_rle().

Referenced by draw_text(), and Fonts_vga_file::paint_text().

Here is the call graph for this function:

int Font::paint_text ( Image_buffer8 win,
const char *  text,
int  textlen,
int  xoff,
int  yoff 
)

Definition at line 224 of file font.cc.

References Shape_frame::get_width(), and Shape_frame::paint_rle().

Here is the call graph for this function:

int Font::paint_text_box_fixedwidth ( Image_buffer8 win,
const char *  text,
int  x,
int  y,
int  w,
int  h,
int  char_width,
int  vert_lead = 0,
int  pbreak = 0 
)

Definition at line 263 of file font.cc.

References Image_buffer::clear_clip(), height, len, Pass_space(), Pass_word(), Image_buffer::set_clip(), and width.

Here is the call graph for this function:

int Font::paint_text_fixedwidth ( Image_buffer8 win,
const char *  text,
int  xoff,
int  yoff,
int  width 
)

Definition at line 374 of file font.cc.

References Shape_frame::get_width(), and Shape_frame::paint_rle().

Referenced by CheatScreen::ActivityDisplay(), CheatScreen::AdvancedFlagLoop(), ShapeBrowser::browse_shapes(), CheatScreen::BusinessDisplay(), CheatScreen::BusinessMenu(), CheatScreen::FlagMenu(), CheatScreen::GlobalFlagLoop(), CheatScreen::NormalDisplay(), CheatScreen::NormalMenu(), CheatScreen::NPCDisplay(), CheatScreen::NPCMenu(), CheatScreen::SharedPrompt(), CheatScreen::StatMenu(), and SoundTester::test_sound().

Here is the call graph for this function:

int Font::paint_text_fixedwidth ( Image_buffer8 win,
const char *  text,
int  textlen,
int  xoff,
int  yoff,
int  width 
)

Definition at line 405 of file font.cc.

References Shape_frame::get_width(), and Shape_frame::paint_rle().

Here is the call graph for this function:

int Font::get_text_width ( const char *  text  ) 

Definition at line 433 of file font.cc.

References Shape_frame::get_width().

Referenced by MenuChoice::add_choice(), center_text(), BG_Game::end_game(), Fonts_vga_file::get_text_width(), Text_button::init(), SI_Game::play_intro(), ExultMenu::run(), and TextScroller::show_line().

Here is the call graph for this function:

int Font::get_text_width ( const char *  text,
int  textlen 
)

Definition at line 453 of file font.cc.

References Shape_frame::get_width().

Here is the call graph for this function:

int Font::get_text_height (  ) 

Definition at line 473 of file font.cc.

Referenced by BG_Game::end_game(), Fonts_vga_file::get_text_height(), MenuChoice::paint(), BG_Game::scene_guardian(), and TextScroller::show_line().

int Font::get_text_baseline (  ) 

Definition at line 487 of file font.cc.

Referenced by Fonts_vga_file::get_text_baseline().

int Font::draw_text ( Image_buffer8 win,
int  x,
int  y,
const char *  s 
) [inline]

Definition at line 68 of file font.h.

References paint_text().

Referenced by ShapeBrowser::browse_shapes(), center_text(), BG_Game::end_game(), SI_Game::new_game(), BG_Game::new_game(), MenuChoice::paint(), SI_Game::play_intro(), ExultMenu::run(), and TextScroller::show_line().

Here is the call graph for this function:

int Font::draw_text_box ( Image_buffer8 win,
int  x,
int  y,
int  w,
int  h,
const char *  s 
) [inline]

Definition at line 70 of file font.h.

References paint_text_box().

Here is the call graph for this function:

int Font::center_text ( Image_buffer8 iwin,
int  x,
int  y,
const char *  s 
)

Definition at line 554 of file font.cc.

References draw_text(), and get_text_width().

Referenced by BG_Game::end_game(), Game::journey_failed_text(), SI_Game::play_intro(), ExultMenu::run(), BG_Game::scene_butterfly(), BG_Game::scene_guardian(), and BG_Game::scene_lord_british().

Here is the call graph for this function:


Member Data Documentation

int Font::hor_lead [private]

Definition at line 32 of file font.h.

Referenced by load().

int Font::ver_lead [private]

Definition at line 33 of file font.h.

Referenced by load().

Shape_file* Font::font_shapes [private]

Definition at line 34 of file font.h.

Referenced by calc_highlow(), load(), and ~Font().

DataSource* Font::font_data [private]

Definition at line 35 of file font.h.

Referenced by load(), and ~Font().

char* Font::font_buf [private]

Definition at line 36 of file font.h.

Referenced by load().

char* Font::orig_font_buf [private]

Definition at line 37 of file font.h.

Referenced by load(), and ~Font().

int Font::highest [private]

Definition at line 38 of file font.h.

Referenced by calc_highlow().

int Font::lowest [private]

Definition at line 38 of file font.h.

Referenced by calc_highlow().


The documentation for this class was generated from the following files:
Generated on Mon Jul 9 14:51:50 2007 for ExultEngine by  doxygen 1.5.1