C# Класс FontPack.PackedFont

PackedFont - Class to read fonts packed by FontPacker
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
DrawString ( string text, float x, float y, Graphics g ) : void

Draws a string using this font at a position using the given Graphics context.

GetAdvanceWidth ( char c ) : int

Get the AdvanceWidth of a glyph

GetGlyph ( char c ) : Image

Get the Glyph of the char

PackedFont ( Stream stream ) : System

Load a PackedFont from a stream.

PackedFont ( string filename ) : System

Load a PackedFont from a file.

Описание методов

DrawString() публичный Метод

Draws a string using this font at a position using the given Graphics context.
public DrawString ( string text, float x, float y, Graphics g ) : void
text string The text to be drawn.
x float The x-position
y float The y-position
g System.Drawing.Graphics The graphics context to be used
Результат void

GetAdvanceWidth() публичный Метод

Get the AdvanceWidth of a glyph
public GetAdvanceWidth ( char c ) : int
c char The character of glyph
Результат int

GetGlyph() публичный Метод

Get the Glyph of the char
public GetGlyph ( char c ) : Image
c char The character of glyph
Результат Image

PackedFont() публичный Метод

Load a PackedFont from a stream.
public PackedFont ( Stream stream ) : System
stream Stream The stream containing the data.
Результат System

PackedFont() публичный Метод

Load a PackedFont from a file.
public PackedFont ( string filename ) : System
filename string The name of the file
Результат System