JPFont Class Reference

#include <JPFont.h>

Inheritance diagram for JPFont:

Pentagram::Font List of all members.

Public Member Functions

 JPFont (ShapeFont *jpfont, unsigned int fontnum)
virtual ~JPFont ()
int getWidth (int c)
virtual int getHeight ()
virtual int getBaseline ()
virtual int getBaselineSkip ()
virtual void getStringSize (const std::string &text, int &width, int &height)
virtual void getTextSize (const std::string &text, int &resultwidth, int &resultheight, unsigned int &remaining, int width=0, int height=0, TextAlign align=TEXT_LEFT, bool u8specials=false)
virtual RenderedTextrenderText (const std::string &text, unsigned int &remaining, int width=0, int height=0, TextAlign align=TEXT_LEFT, bool u8specials=false, std::string::size_type cursor=std::string::npos)
 ENABLE_RUNTIME_CLASSTYPE ()

Protected Attributes

unsigned int fontnum
ShapeFontshapefont

Detailed Description

Definition at line 26 of file JPFont.h.


Constructor & Destructor Documentation

JPFont::JPFont ( ShapeFont jpfont,
unsigned int  fontnum 
)

Definition at line 30 of file JPFont.cpp.

References Shape::frameCount(), and shapefont.

JPFont::~JPFont (  )  [virtual]

Definition at line 37 of file JPFont.cpp.


Member Function Documentation

JPFont::ENABLE_RUNTIME_CLASSTYPE (  ) 

Reimplemented from Pentagram::Font.

int JPFont::getBaseline (  )  [virtual]

get the baseline of the font (relative from the top)

Implements Pentagram::Font.

Definition at line 52 of file JPFont.cpp.

References ShapeFont::getBaseline(), and shapefont.

int JPFont::getBaselineSkip (  )  [virtual]

get the baselineskip of the font (distance between two baselines)

Implements Pentagram::Font.

Definition at line 57 of file JPFont.cpp.

References ShapeFont::getBaselineSkip(), and shapefont.

int JPFont::getHeight (  )  [virtual]

get the height of the font

Implements Pentagram::Font.

Definition at line 47 of file JPFont.cpp.

References ShapeFont::getHeight(), and shapefont.

Referenced by getStringSize().

void JPFont::getStringSize ( const std::string &  text,
int &  width,
int &  height 
) [virtual]

get the dimensions of a string (not containing any newlines)

Parameters:
text The string
width Returns the width
height Returns the height

Implements Pentagram::Font.

Definition at line 63 of file JPFont.cpp.

References getHeight(), ShapeFont::getHlead(), getWidth(), shapefont, and Pentagram::shiftjis_to_ultima8().

void JPFont::getTextSize ( const std::string &  text,
int &  resultwidth,
int &  resultheight,
unsigned int &  remaining,
int  width = 0,
int  height = 0,
TextAlign  align = TEXT_LEFT,
bool  u8specials = false 
) [virtual]

Definition at line 84 of file JPFont.cpp.

int JPFont::getWidth ( int  c  ) 

Definition at line 42 of file JPFont.cpp.

References Shape::getFrame(), shapefont, and ShapeFrame::width.

Referenced by getStringSize().

RenderedText * JPFont::renderText ( const std::string &  text,
unsigned int &  remaining,
int  width = 0,
int  height = 0,
TextAlign  align = TEXT_LEFT,
bool  u8specials = false,
std::string::size_type  cursor = std::string::npos 
) [virtual]

Definition at line 96 of file JPFont.cpp.

References fontnum, ShapeFont::getVlead(), and shapefont.


Member Data Documentation

unsigned int JPFont::fontnum [protected]

Definition at line 57 of file JPFont.h.

Referenced by renderText().

ShapeFont* JPFont::shapefont [protected]

Definition at line 58 of file JPFont.h.

Referenced by getBaseline(), getBaselineSkip(), getHeight(), getStringSize(), getWidth(), JPFont(), and renderText().


The documentation for this class was generated from the following files:
Generated on Fri Jul 27 22:29:30 2007 for pentagram by  doxygen 1.4.7