C# 클래스 XNAExtras.BitmapFont

Bitmap font class for XNA
파일 보기 프로젝트 열기: jackpal/Dandy-Dungeon 1 사용 예제들

공개 메소드들

메소드 설명
BitmapFont ( string strFontFilename ) : System

Create a new font from the info in the specified font descriptor (XML) file

DrawString ( Color color, string format ) : int

Draw the given string using the specified color. The text drawing location is immediately after the last drawn text (default=0,0).

DrawString ( Vector2 vOrigin, Color color, string format ) : int

Draw the given string at vOrigin using the specified color

DrawString ( int x, int y, Color color, string format ) : int

Draw the given string at (x,y) using the specified color

DrawString ( int x, int y, string format ) : int

Draw the given string at (x,y). The text color is inherited from the last draw command (default=White).

DrawString ( string format ) : int

Draw the given string at (x,y). The text drawing location is immediately after the last drawn text (default=0,0). The text color is inherited from the last draw command (default=White).

MeasureString ( string format ) : int

Calculate the width of the given string.

Reset ( GraphicsDevice device ) : void

Reset the font when the device has changed

SetPen ( int x, int y ) : void

Set the current pen position

비공개 메소드들

메소드 설명
CalcKern ( char chLeft, char chRight ) : int

Get the kern value for the given pair of characters

GetXMLAttribute ( XmlNode n, string strAttr ) : string

Get the XML attribute value (without throwing if the attribute doesn't exist)

LoadFontXML ( XmlNodeList xnl ) : void

Load the font data from an XML font descriptor file

LoadFontXML_bitmaps ( XmlNodeList xnl ) : void

Load the data from the "bitmaps" node

LoadFontXML_font ( XmlNodeList xnl ) : void

Load the data from the "font" node

LoadFontXML_glyphs ( XmlNodeList xnl ) : void

Load the data from the "glyphs" node

LoadFontXML_kernpairs ( XmlNodeList xnl ) : void

Load the data from the "kernpairs" node

메소드 상세

BitmapFont() 공개 메소드

Create a new font from the info in the specified font descriptor (XML) file
public BitmapFont ( string strFontFilename ) : System
strFontFilename string font file (.xml)
리턴 System

DrawString() 공개 메소드

Draw the given string using the specified color. The text drawing location is immediately after the last drawn text (default=0,0).
public DrawString ( Color color, string format ) : int
color Color Text color
format string String format
리턴 int

DrawString() 공개 메소드

Draw the given string at vOrigin using the specified color
public DrawString ( Vector2 vOrigin, Color color, string format ) : int
vOrigin Vector2 (x,y) coord
color Color Text color
format string String format
리턴 int

DrawString() 공개 메소드

Draw the given string at (x,y) using the specified color
public DrawString ( int x, int y, Color color, string format ) : int
x int X-coord
y int Y-coord
color Color Text color
format string String format
리턴 int

DrawString() 공개 메소드

Draw the given string at (x,y). The text color is inherited from the last draw command (default=White).
public DrawString ( int x, int y, string format ) : int
x int X-coord
y int Y-coord
format string String format
리턴 int

DrawString() 공개 메소드

Draw the given string at (x,y). The text drawing location is immediately after the last drawn text (default=0,0). The text color is inherited from the last draw command (default=White).
public DrawString ( string format ) : int
format string String format
리턴 int

MeasureString() 공개 메소드

Calculate the width of the given string.
public MeasureString ( string format ) : int
format string String format
리턴 int

Reset() 공개 메소드

Reset the font when the device has changed
public Reset ( GraphicsDevice device ) : void
device GraphicsDevice The new device
리턴 void

SetPen() 공개 메소드

Set the current pen position
public SetPen ( int x, int y ) : void
x int X-coord
y int Y-coord
리턴 void