C# 클래스 SparrowSharp.Fonts.BitmapFont

The BitmapFont class parses bitmap font files and arranges the glyphs in the form of a text. The class parses the XML format as it is used in the AngelCode Bitmap Font Generator. This is what the file format looks like: _You don't have to use this class directly in most cases. TextField contains methods that handle bitmap fonts for you._
파일 보기 프로젝트 열기: fmotagarcia/sparrow-sharp 1 사용 예제들

공개 메소드들

메소드 설명
BitmapFont ( ) : System

Initializes a new instance with an embedded mini font. This font's characters have a height of 5 pixels and a maximum width of 5 pixels.

BitmapFont ( Stream fontTextureData, Stream fontXmlData ) : System
CharById ( int charId ) : BitmapChar

Returns a single bitmap char with a certain character ID.

FillQuadBatch ( QuadBatch quadBatch, float width, float height, string text, float size, uint color, HAlign hAlign, VAlign vAlign, bool autoScale, bool kerning ) : void

Draws text into a quad batch.

비공개 메소드들

메소드 설명
ArrangeCharsInArea ( float width, float height, string text, float size, HAlign hAlign, VAlign vAlign, bool autoScale, bool kerning ) : List
ParseAndLoadChars ( XmlDocument xml, float scale ) : void
ParseAndLoadCommon ( XmlDocument xml ) : void
ParseAndLoadInfo ( XmlDocument xml ) : void
ParseAndLoadKerning ( XmlDocument xml, float scale ) : void
ParseFontData ( Stream fontTextureData, Stream fontXmlData ) : void
TextureReferencedByXmlData ( TextureLoader textureLoader, Stream fontXmlData ) : Texture

메소드 상세

BitmapFont() 공개 메소드

Initializes a new instance with an embedded mini font. This font's characters have a height of 5 pixels and a maximum width of 5 pixels.
public BitmapFont ( ) : System
리턴 System

BitmapFont() 공개 메소드

public BitmapFont ( Stream fontTextureData, Stream fontXmlData ) : System
fontTextureData Stream
fontXmlData Stream
리턴 System

CharById() 공개 메소드

Returns a single bitmap char with a certain character ID.
public CharById ( int charId ) : BitmapChar
charId int
리턴 BitmapChar

FillQuadBatch() 공개 메소드

Draws text into a quad batch.
public FillQuadBatch ( QuadBatch quadBatch, float width, float height, string text, float size, uint color, HAlign hAlign, VAlign vAlign, bool autoScale, bool kerning ) : void
quadBatch Sparrow.Display.QuadBatch
width float
height float
text string
size float
color uint
hAlign HAlign
vAlign VAlign
autoScale bool
kerning bool
리턴 void