IGUIFont Class Reference

#include <IGUIFont.h>

Inheritance diagram for IGUIFont:

IrrUnknown CGUIFont

Public Member Functions

Protected Member Functions


Constructor & Destructor Documentation

virtual ~IGUIFont (  )  [inline, virtual]


Member Function Documentation

virtual void draw ( const wchar_t *  text,
const core::rect< s32 > &  position,
video::SColor  color,
bool  hcenter = false,
bool  vcenter = false,
const core::rect< s32 > *  clip = 0 
) [pure virtual]

Parameters:
text,: Text to draw
position,: Rectangle specifying position where to draw the text.
color,: Color of the text
hcenter,: Specifiies if the text should be centered horizontally into the rectangle.
vcenter,: Specifiies if the text should be centered vertically into the rectangle.
clip,: Optional pointer to a rectalgle against which the text will be clipped. If the pointer is null, no clipping will be done.

Implemented in CGUIFont.

bool drop (  )  [inline, inherited]

Drops the object. Decrements the reference counter by one. Returns true, if the object was deleted. The IrrUnknown class provides a basic reference counting mechanism with its methods grab() and drop(). Most objects of the Irrlicht Engine are derived from IrrUnknown, and so they are reference counted.

When you create an object in the Irrlicht engine, calling a method which starts with 'create', an object is created, and you get a pointer to the new object. If you no longer need the object, you have to call drop(). This will destroy the object, if grab() was not called in another part of you program, because this part still needs the object. Note, that you only need to call drop() to the object, if you created it, and the method had a 'create' in it.

A simple example:

If you want to create a texture, you may want to call an imaginable method IDriver::createTexture. You call ITexture* texture = driver->createTexture(dimension2d<s32>(128, 128)); If you no longer need the texture, call texture->drop(). If you want to load a texture, you may want to call imaginable method IDriver::loadTexture. You do this like ITexture* texture = driver->loadTexture("example.jpg"); You will not have to drop the pointer to the loaded texture, because the name of the method does not start with 'create'. The texture is stored somewhere by the driver.

virtual s32 getCharacterFromPos ( const wchar_t *  text,
s32  pixel_x 
) [pure virtual]

Parameters:
text,: Text string.
pixel_x,: X pixel position of which the index of the character will be returned.
Returns:
Returns zero based index of the character in the text, and -1 if no no character is on this position. (=the text is too short).

Implemented in CGUIFont.

const c8* getDebugName (  )  const [inline, inherited]

Returns the debug name of the object. The Debugname may only be set and changed by the object itself. This method should only be used in Debug mode.

Returns:
Returns a string, previously set by setDebugName();

virtual core::dimension2d<s32> getDimension ( const wchar_t *  text  )  [pure virtual]

Returns:
Returns width and height of the area covered by the text if it would be drawn.

Implemented in CGUIFont.

void grab (  )  [inline, inherited]

Grabs the object. Increments the reference counter by one. Someone who calls grab() to an object, should later also call drop() to it. If an object never gets as much drop() as grab() calls, it will never be destroyed. The IrrUnknown class provides a basic reference counting mechanism with its methods grab() and drop(). Most objects of the Irrlicht Engine are derived from IrrUnknown, and so they are reference counted.

When you create an object in the Irrlicht engine, calling a method which starts with 'create', an object is created, and you get a pointer to the new object. If you no longer need the object, you have to call drop(). This will destroy the object, if grab() was not called in another part of you program, because this part still needs the object. Note, that you only need to call drop() to the object, if you created it, and the method had a 'create' in it.

A simple example:

If you want to create a texture, you may want to call an imaginable method IDriver::createTexture. You call ITexture* texture = driver->createTexture(dimension2d<s32>(128, 128)); If you no longer need the texture, call texture->drop(). If you want to load a texture, you may want to call imaginable method IDriver::loadTexture. You do this like ITexture* texture = driver->loadTexture("example.jpg"); You will not have to drop the pointer to the loaded texture, because the name of the method does not start with 'create'. The texture is stored somewhere by the driver.

void setDebugName ( const c8 newName  )  [inline, protected, inherited]

Sets the debug name of the object. The Debugname may only be set and changed by the object itself. This method should only be used in Debug mode.

Parameters:
newName,: New debug name to set.


Generated on Fri Apr 27 14:47:09 2007 for IrrSpintz by  doxygen 1.5.1-p1