C# Class BitmapFont, distancefield-unity

Inheritance: MonoBehaviour
显示文件 Open project: kvantetore/distancefield-unity Class Usage Examples

Public Properties

Property Type Description
AlphaMax float
AlphaMin float
Base float
Chars BitmapChar[],
Color Color
Kernings BitmapCharKerning[],
LineHeight float
PageAtlas UnityEngine.Texture2D
PageOffsets Rect[]
ScaleH float
ScaleW float
ShadowAlphaMax float
ShadowAlphaMin float
ShadowColor Color
ShadowOffset Vector2
Size float

Public Methods

Method Description
CalculateSize ( string str, Vector2 renderSize ) : Vector2
CalculateSize ( string str, float renderSize ) : Vector2
CreateFontMaterial ( ) : Material
GetBitmapChar ( int c ) : BitmapChar,
GetCharacterMaterial ( int c ) : Material
GetKerning ( char first, char second ) : float
GetPageMaterial ( int page ) : Material
GetUVRect ( BitmapChar, bitmapChar ) : Rect
GetUVRect ( int c ) : Rect
Render ( Vector2 position, string str, Vector2 renderSize ) : Vector2
Render ( Vector2 position, string str, float renderSize ) : Vector2
UpdateFontMaterial ( Material fontMaterial ) : void

Method Details

CalculateSize() public method

public CalculateSize ( string str, Vector2 renderSize ) : Vector2
str string
renderSize Vector2
return Vector2

CalculateSize() public method

public CalculateSize ( string str, float renderSize ) : Vector2
str string
renderSize float
return Vector2

CreateFontMaterial() public method

public CreateFontMaterial ( ) : Material
return Material

GetBitmapChar() public method

public GetBitmapChar ( int c ) : BitmapChar,
c int
return BitmapChar,

GetCharacterMaterial() public method

public GetCharacterMaterial ( int c ) : Material
c int
return Material

GetKerning() public method

public GetKerning ( char first, char second ) : float
first char
second char
return float

GetPageMaterial() public method

public GetPageMaterial ( int page ) : Material
page int
return Material

GetUVRect() public method

public GetUVRect ( BitmapChar, bitmapChar ) : Rect
bitmapChar BitmapChar,
return Rect

GetUVRect() public method

public GetUVRect ( int c ) : Rect
c int
return Rect

Render() public method

public Render ( Vector2 position, string str, Vector2 renderSize ) : Vector2
position Vector2
str string
renderSize Vector2
return Vector2

Render() public method

public Render ( Vector2 position, string str, float renderSize ) : Vector2
position Vector2
str string
renderSize float
return Vector2

UpdateFontMaterial() public method

public UpdateFontMaterial ( Material fontMaterial ) : void
fontMaterial Material
return void

Property Details

AlphaMax public_oe property

public float AlphaMax
return float

AlphaMin public_oe property

public float AlphaMin
return float

Base public_oe property

public float Base
return float

Chars public_oe property

public BitmapChar[], Chars
return BitmapChar[],

Color public_oe property

public Color Color
return Color

Kernings public_oe property

public BitmapCharKerning[], Kernings
return BitmapCharKerning[],

LineHeight public_oe property

public float LineHeight
return float

PageAtlas public_oe property

public Texture2D,UnityEngine PageAtlas
return UnityEngine.Texture2D

PageOffsets public_oe property

public Rect[] PageOffsets
return Rect[]

ScaleH public_oe property

public float ScaleH
return float

ScaleW public_oe property

public float ScaleW
return float

ShadowAlphaMax public_oe property

public float ShadowAlphaMax
return float

ShadowAlphaMin public_oe property

public float ShadowAlphaMin
return float

ShadowColor public_oe property

public Color ShadowColor
return Color

ShadowOffset public_oe property

public Vector2 ShadowOffset
return Vector2

Size public_oe property

public float Size
return float