C# Class BitmapFont, distancefield-unity

Inheritance: MonoBehaviour
Show file 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 property

public float AlphaMax
return float

AlphaMin public property

public float AlphaMin
return float

Base public property

public float Base
return float

Chars public property

public BitmapChar[], Chars
return BitmapChar[],

Color public property

public Color Color
return Color

Kernings public property

public BitmapCharKerning[], Kernings
return BitmapCharKerning[],

LineHeight public property

public float LineHeight
return float

PageAtlas public property

public Texture2D,UnityEngine PageAtlas
return UnityEngine.Texture2D

PageOffsets public property

public Rect[] PageOffsets
return Rect[]

ScaleH public property

public float ScaleH
return float

ScaleW public property

public float ScaleW
return float

ShadowAlphaMax public property

public float ShadowAlphaMax
return float

ShadowAlphaMin public property

public float ShadowAlphaMin
return float

ShadowColor public property

public Color ShadowColor
return Color

ShadowOffset public property

public Vector2 ShadowOffset
return Vector2

Size public property

public float Size
return float