C# 클래스 Axiom.Fonts.Font

This class is simply a way of getting a font texture into the engine and to easily retrieve the texture coordinates required to accurately render them. Fonts can either be loaded from precreated textures, or the texture can be generated using a truetype font. You can either create the texture manually in code, or you can use an XML font script to define it (probably more practical since you can reuse the definition more easily)
This class extends both Resource and ManualResourceLoader since it is both a resource in it's own right, but it also provides the manual load implementation for the Texture it creates.
상속: Axiom.Core.Resource, IManualResourceLoader
파일 보기 프로젝트 열기: WolfgangSt/axiom 1 사용 예제들

공개 메소드들

메소드 설명
Font ( ResourceManager parent, string name, System.UInt64 handle, string group ) : System

Constructor, should be called through FontManager.Create().

Font ( ResourceManager parent, string name, System.UInt64 handle, string group, bool isManual, IManualResourceLoader loader ) : System
LoadResource ( Axiom.Core.Resource resource ) : void

보호된 메소드들

메소드 설명
calculateSize ( ) : int
createTexture ( ) : void
load ( ) : void
unload ( ) : void

비공개 메소드들

메소드 설명
GetGlyphAspectRatio ( char c ) : float
GetGlyphTexCoords ( UInt32 c, Real &u1, Real &v1, Real &u2, Real &v2 ) : void
SetGlyphTexCoords ( UInt32 c, Real u1, Real v1, Real u2, Real v2 ) : void
SetGlyphTexCoords ( UInt32 c, Real u1, Real v1, Real u2, Real v2, Real aspect ) : void
StrBBox ( string text, float char_height, Axiom.Graphics.RenderWindow window ) : Pair

Returns the size in pixels of a box that could contain the whole string.

메소드 상세

Font() 공개 메소드

Constructor, should be called through FontManager.Create().
public Font ( ResourceManager parent, string name, System.UInt64 handle, string group ) : System
parent Axiom.Core.ResourceManager
name string
handle System.UInt64
group string
리턴 System

Font() 공개 메소드

public Font ( ResourceManager parent, string name, System.UInt64 handle, string group, bool isManual, IManualResourceLoader loader ) : System
parent Axiom.Core.ResourceManager
name string
handle System.UInt64
group string
isManual bool
loader IManualResourceLoader
리턴 System

LoadResource() 공개 메소드

public LoadResource ( Axiom.Core.Resource resource ) : void
resource Axiom.Core.Resource
리턴 void

calculateSize() 보호된 메소드

protected calculateSize ( ) : int
리턴 int

createTexture() 보호된 메소드

protected createTexture ( ) : void
리턴 void

load() 보호된 메소드

protected load ( ) : void
리턴 void

unload() 보호된 메소드

protected unload ( ) : void
리턴 void