C# Class OpenRA.Graphics.SpriteFont

Datei anzeigen Open project: pchote/OpenRA Class Usage Examples

Public Methods

Method Description
Dispose ( ) : void
DrawText ( string text, float2 location, Color c ) : void
DrawTextWithContrast ( string text, float2 location, Color fg, Color bgDark, Color bgLight, int offset ) : void
DrawTextWithContrast ( string text, float2 location, Color fg, Color bg, int offset ) : void
DrawTextWithShadow ( string text, float2 location, Color fg, Color bgDark, Color bgLight, int offset ) : void
DrawTextWithShadow ( string text, float2 location, Color fg, Color bg, int offset ) : void
Measure ( string text ) : int2
SpriteFont ( string name, byte data, int size, SheetBuilder builder ) : System

Private Methods

Method Description
CreateGlyph ( Color>.Pair c ) : GlyphInfo
PrecacheColor ( Color c, string name ) : void

Method Details

Dispose() public method

public Dispose ( ) : void
return void

DrawText() public method

public DrawText ( string text, float2 location, Color c ) : void
text string
location float2
c Color
return void

DrawTextWithContrast() public method

public DrawTextWithContrast ( string text, float2 location, Color fg, Color bgDark, Color bgLight, int offset ) : void
text string
location float2
fg Color
bgDark Color
bgLight Color
offset int
return void

DrawTextWithContrast() public method

public DrawTextWithContrast ( string text, float2 location, Color fg, Color bg, int offset ) : void
text string
location float2
fg Color
bg Color
offset int
return void

DrawTextWithShadow() public method

public DrawTextWithShadow ( string text, float2 location, Color fg, Color bgDark, Color bgLight, int offset ) : void
text string
location float2
fg Color
bgDark Color
bgLight Color
offset int
return void

DrawTextWithShadow() public method

public DrawTextWithShadow ( string text, float2 location, Color fg, Color bg, int offset ) : void
text string
location float2
fg Color
bg Color
offset int
return void

Measure() public method

public Measure ( string text ) : int2
text string
return int2

SpriteFont() public method

public SpriteFont ( string name, byte data, int size, SheetBuilder builder ) : System
name string
data byte
size int
builder SheetBuilder
return System