Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

BFont Class Reference

#include </home/clem/local/src/opie/noncore/games/sfcave-sdl/bfont.h>

List of all members.

Public Member Functions

 BFont (const char *__filename)
 ~BFont ()
int FontHeight ()
void SetFontHeight (int height)
int CharWidth (char c)
void LoadFont (const char *filename)
int PutChar (SDL_Surface *screen, int x, int y, char c)
int TextWidth (const char *text)
BFontSetFontColor (Uint8 r, Uint8 g, Uint8 b)
void PutString (SDL_Surface *screen, int x, int y, const char *text)
void LeftPutString (SDL_Surface *screen, int y, const char *text)
void CenteredPutString (SDL_Surface *screen, int y, const char *text)
void RightPutString (SDL_Surface *screen, int y, const char *text)
void JustifiedPutString (SDL_Surface *screen, int y, const char *text)
void PrintString (SDL_Surface *screen, int x, int y, char *fmt,...)
void CenteredPrintString (SDL_Surface *screen, int y, char *fmt,...)
void RightPrintString (SDL_Surface *screen, int y, char *fmt,...)
void LeftPrintString (SDL_Surface *screen, int y, char *fmt,...)
void JustifiedPrintString (SDL_Surface *screen, int y, char *fmt,...)

Private Member Functions

 BFont (const BFont &)
void InitFont ()
int count (const char *text)
Uint32 GetPixel (Sint32 X, Sint32 Y)
Uint32 xGetPixel (SDL_Surface *surface, int x, int y)
void PutPixel (SDL_Surface *, int x, int y, Uint32 pixel)

Private Attributes

int h
SDL_Surface * Surface
SDL_Rect Chars [256]
const char * name


Constructor & Destructor Documentation

BFont::BFont const BFont  )  [private]
 

Referenced by SetFontColor().

BFont::BFont const char *  __filename  )  [inline]
 

Definition at line 27 of file bfont.h.

References LoadFont().

BFont::~BFont  )  [inline]
 

Definition at line 31 of file bfont.h.

References Surface.


Member Function Documentation

void BFont::CenteredPrintString SDL_Surface *  screen,
int  y,
char *  fmt,
  ...
 

Definition at line 288 of file bfont.cpp.

References CenteredPutString(), and NULL.

void BFont::CenteredPutString SDL_Surface *  screen,
int  y,
const char *  text
 

Definition at line 255 of file bfont.cpp.

References printf, PutString(), and TextWidth().

Referenced by CenteredPrintString().

int BFont::CharWidth char  c  )  [inline]
 

Definition at line 40 of file bfont.h.

References Chars.

Referenced by JustifiedPutString(), PutChar(), and TextWidth().

int BFont::count const char *  text  )  [private]
 

Definition at line 185 of file bfont.cpp.

References i, NULL, p, and pos.

Referenced by JustifiedPutString().

int BFont::FontHeight  )  [inline]
 

Definition at line 34 of file bfont.h.

References h.

Referenced by PutChar().

Uint32 BFont::GetPixel Sint32  X,
Sint32  Y
[private]
 

Definition at line 405 of file bfont.cpp.

References bits, g, and Surface.

Referenced by InitFont().

void BFont::InitFont  )  [private]
 

Definition at line 15 of file bfont.cpp.

References Chars, GetPixel(), h, i, Surface, and Opie::MM::x.

Referenced by LoadFont().

void BFont::JustifiedPrintString SDL_Surface *  screen,
int  y,
char *  fmt,
  ...
 

Definition at line 330 of file bfont.cpp.

References JustifiedPutString(), and NULL.

void BFont::JustifiedPutString SDL_Surface *  screen,
int  y,
const char *  text
 

Definition at line 200 of file bfont.cpp.

References CharWidth(), count(), NULL, p, pos, PutString(), and TextWidth().

Referenced by JustifiedPrintString().

void BFont::LeftPrintString SDL_Surface *  screen,
int  y,
char *  fmt,
  ...
 

Definition at line 316 of file bfont.cpp.

References LeftPutString(), and NULL.

void BFont::LeftPutString SDL_Surface *  screen,
int  y,
const char *  text
 

Definition at line 267 of file bfont.cpp.

References PutString().

Referenced by LeftPrintString().

void BFont::LoadFont const char *  filename  ) 
 

Definition at line 51 of file bfont.cpp.

References Chars, InitFont(), NULL, Surface, and Opie::MM::x.

Referenced by BFont().

void BFont::PrintString SDL_Surface *  screen,
int  x,
int  y,
char *  fmt,
  ...
 

Definition at line 274 of file bfont.cpp.

References NULL, and PutString().

int BFont::PutChar SDL_Surface *  screen,
int  x,
int  y,
char  c
 

Definition at line 143 of file bfont.cpp.

References Chars, CharWidth(), Opie::MM::dest, FontHeight(), and Surface.

Referenced by PutString().

void BFont::PutPixel SDL_Surface *  ,
int  x,
int  y,
Uint32  pixel
[private]
 

Definition at line 345 of file bfont.cpp.

References p.

Referenced by SetFontColor().

void BFont::PutString SDL_Surface *  screen,
int  x,
int  y,
const char *  text
 

Definition at line 161 of file bfont.cpp.

References i, and PutChar().

Referenced by CenteredPutString(), JustifiedPutString(), LeftPutString(), PrintString(), and RightPutString().

void BFont::RightPrintString SDL_Surface *  screen,
int  y,
char *  fmt,
  ...
 

Definition at line 302 of file bfont.cpp.

References NULL, and RightPutString().

void BFont::RightPutString SDL_Surface *  screen,
int  y,
const char *  text
 

Definition at line 262 of file bfont.cpp.

References PutString(), and TextWidth().

Referenced by RightPrintString().

BFont * BFont::SetFontColor Uint8  r,
Uint8  g,
Uint8  b
 

Definition at line 78 of file bfont.cpp.

References BFont(), Chars, h, NULL, PutPixel(), Surface, Opie::MM::x, xGetPixel(), and Opie::MM::y.

void BFont::SetFontHeight int  height  )  [inline]
 

Definition at line 37 of file bfont.h.

References h.

int BFont::TextWidth const char *  text  ) 
 

Definition at line 171 of file bfont.cpp.

References CharWidth(), i, and Opie::MM::x.

Referenced by CenteredPutString(), JustifiedPutString(), and RightPutString().

Uint32 BFont::xGetPixel SDL_Surface *  surface,
int  x,
int  y
[private]
 

Definition at line 378 of file bfont.cpp.

References p.

Referenced by SetFontColor().


Member Data Documentation

SDL_Rect BFont::Chars[256] [private]
 

Definition at line 18 of file bfont.h.

Referenced by CharWidth(), InitFont(), LoadFont(), PutChar(), and SetFontColor().

int BFont::h [private]
 

Definition at line 16 of file bfont.h.

Referenced by FontHeight(), InitFont(), SetFontColor(), and SetFontHeight().

const char* BFont::name [private]
 

Definition at line 19 of file bfont.h.

SDL_Surface* BFont::Surface [private]
 

Definition at line 17 of file bfont.h.

Referenced by GetPixel(), InitFont(), LoadFont(), PutChar(), SetFontColor(), and ~BFont().


The documentation for this class was generated from the following files:
Generated on Sat Nov 5 17:27:10 2005 for OPIE by  doxygen 1.4.2