C# Class MediaPortal.GUI.Library.GUIFontManager

The class responsible for keeping track of the used fonts.
Mostra file Open project: MediaPortal/MediaPortal-1 Class Usage Examples

Protected Properties

Property Type Description
DictFontAlias string>.Dictionary
ListFonts List

Public Methods

Method Description
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

Private Methods

Method Description
CachedSystemFont ( int fontSize ) : System.Drawing.Microsoft.DirectX.Direct3D.Font
DrawTextUsingTexture ( FontManagerDrawText draw, int fontSize ) : void
GUIFontManager ( ) : System

Method Details

ClearFontCache() public static method

public static ClearFontCache ( ) : void
return void

Dispose() public static method

Disposes all GUIFonts.
public static Dispose ( ) : void
return void

DrawText() public static method

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
return void

GetFont() public static method

Gets a GUIFont.
public static GetFont ( int iFont ) : MediaPortal.GUI.Library.GUIFont
iFont int The font number
return MediaPortal.GUI.Library.GUIFont

GetFont() public static method

Gets a GUIFont.
public static GetFont ( string strFontName ) : MediaPortal.GUI.Library.GUIFont
strFontName string The name of the font
return MediaPortal.GUI.Library.GUIFont

InitializeDeviceObjects() public static method

Initializes the device objects of the GUIFonts.
public static InitializeDeviceObjects ( ) : void
return void

LoadFonts() public static method

Loads the fonts from a file.
public static LoadFonts ( string strFilename ) : bool
strFilename string The filename from where the fonts are loaded.
return bool

MeasureText() public static method

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
return void

MeasureText() public static method

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
return void

Present() public static method

public static Present ( ) : void
return void

SetDevice() public static method

Sets the device and the FVF.
public static SetDevice ( ) : void
return void

SetDeviceNull() public static method

public static SetDeviceNull ( ) : void
return void

Property Details

DictFontAlias protected_oe static_oe property

protected static Dictionary DictFontAlias
return string>.Dictionary

ListFonts protected_oe static_oe property

protected static List ListFonts
return List