#include <font.h>
Collaboration diagram for Font:

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_file * | font_shapes |
| DataSource * | font_data |
| char * | font_buf |
| char * | orig_font_buf |
| int | highest |
| int | lowest |
Definition at line 29 of file font.h.
| Font::Font | ( | const char * | fname, | |
| int | index, | |||
| int | hlead = 0, |
|||
| int | vlead = 1 | |||
| ) |
| Font::~Font | ( | ) |
| 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 | ( | ) |
| 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:

int Font::hor_lead [private] |
int Font::ver_lead [private] |
Shape_file* Font::font_shapes [private] |
DataSource* Font::font_data [private] |
char* Font::font_buf [private] |
char* Font::orig_font_buf [private] |
int Font::highest [private] |
int Font::lowest [private] |
1.5.1