Class TGLBitmapFont

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TGLBitmapFont = class(TGLBitmapFontAbstract)

Description

OpenGL bitmap font. Uses a font description from CastleBitmapFonts unit (TBitmapFont type), and creates OpenGL resources to render text using this font.

This way we can use fonts embedded in our source code (as TBitmapFont type), independent from the fonts available in external files, operating system and such. Or we can load TBitmapFont from file.

See also TGLOutlineFont for a similar class for outline fonts.

Hierarchy

Overview

Methods

Public constructor Create(ABitmapFont: TBitmapFont);
Public destructor Destroy; override;
Public procedure PrintAndMove(const s: string); override;
Public function TextWidth(const s: string): integer; override;
Public function TextHeight(const s: string): integer; override;
Public function TextHeightBase(const s: string): integer; override;

Description

Methods

Public constructor Create(ABitmapFont: TBitmapFont);

Create OpenGL resources to render given bitmap font.

We remember the pointer BitmapFont, without copying the contents. So do not free the BitmapFont contents, do not change it at all actually, during the lifetime of this object.

Public destructor Destroy; override;
 
Public procedure PrintAndMove(const s: string); override;
 
Public function TextWidth(const s: string): integer; override;
 
Public function TextHeight(const s: string): integer; override;
 
Public function TextHeightBase(const s: string): integer; override;
 

Generated by PasDoc 0.13.0 on 2013-08-17 21:27:12