C# Класс MediaPortal.GUI.Library.GUIFontManager

The class responsible for keeping track of the used fonts.
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
DictFontAlias string>.Dictionary
ListFonts List

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

Метод Описание
ClearFontCache ( ) : void
Dispose ( ) : void

Disposes all GUIFonts.

DrawText ( Microsoft.DirectX.Direct3D.Font fnt, float xpos, float ypos, Color color, string text, int maxWidth, int fontHeight ) : void
GetFont ( int iFont ) : MediaPortal.GUI.Library.GUIFont

Gets a GUIFont.

GetFont ( string strFontName ) : MediaPortal.GUI.Library.GUIFont

Gets a GUIFont.

InitializeDeviceObjects ( ) : void

Initializes the device objects of the GUIFonts.

LoadFonts ( string strFilename ) : bool

Loads the fonts from a file.

MeasureText ( Microsoft.DirectX.Direct3D.Font fnt, string text, float &textwidth, float &textheight, int fontSize ) : void
MeasureText ( string text, float &textwidth, float &textheight, int fontSize ) : void

Uses GDI+ Graphics to render a given text and measure the it's size

Present ( ) : void
SetDevice ( ) : void

Sets the device and the FVF.

SetDeviceNull ( ) : void

Приватные методы

Метод Описание
CachedSystemFont ( int fontSize ) : System.Drawing.Microsoft.DirectX.Direct3D.Font
DrawTextUsingTexture ( FontManagerDrawText draw, int fontSize ) : void
GUIFontManager ( ) : System

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

ClearFontCache() публичный статический Метод

public static ClearFontCache ( ) : void
Результат void

Dispose() публичный статический Метод

Disposes all GUIFonts.
public static Dispose ( ) : void
Результат void

DrawText() публичный статический Метод

public static DrawText ( Microsoft.DirectX.Direct3D.Font fnt, float xpos, float ypos, Color color, string text, int maxWidth, int fontHeight ) : void
fnt Microsoft.DirectX.Direct3D.Font
xpos float
ypos float
color Color
text string
maxWidth int
fontHeight int
Результат void

GetFont() публичный статический Метод

Gets a GUIFont.
public static GetFont ( int iFont ) : MediaPortal.GUI.Library.GUIFont
iFont int The font number
Результат MediaPortal.GUI.Library.GUIFont

GetFont() публичный статический Метод

Gets a GUIFont.
public static GetFont ( string strFontName ) : MediaPortal.GUI.Library.GUIFont
strFontName string The name of the font
Результат MediaPortal.GUI.Library.GUIFont

InitializeDeviceObjects() публичный статический Метод

Initializes the device objects of the GUIFonts.
public static InitializeDeviceObjects ( ) : void
Результат void

LoadFonts() публичный статический Метод

Loads the fonts from a file.
public static LoadFonts ( string strFilename ) : bool
strFilename string The filename from where the fonts are loaded.
Результат bool

MeasureText() публичный статический Метод

public static MeasureText ( Microsoft.DirectX.Direct3D.Font fnt, string text, float &textwidth, float &textheight, int fontSize ) : void
fnt Microsoft.DirectX.Direct3D.Font
text string
textwidth float
textheight float
fontSize int
Результат void

MeasureText() публичный статический Метод

Uses GDI+ Graphics to render a given text and measure the it's size
public static MeasureText ( string text, float &textwidth, float &textheight, int fontSize ) : void
text string
textwidth float
textheight float
fontSize int
Результат void

Present() публичный статический Метод

public static Present ( ) : void
Результат void

SetDevice() публичный статический Метод

Sets the device and the FVF.
public static SetDevice ( ) : void
Результат void

SetDeviceNull() публичный статический Метод

public static SetDeviceNull ( ) : void
Результат void

Описание свойств

DictFontAlias защищенное статическое свойство

protected static Dictionary DictFontAlias
Результат string>.Dictionary

ListFonts защищенное статическое свойство

protected static List ListFonts
Результат List