|
| | BitmapFont (Texture2D texture, IEnumerable< Glyph > glyphs, char fallbackCode, float glyphHeight, Vector2 spacing, float scale) |
| void | Dispose () |
| Glyph | GetGlyph (char code) |
| float | GetKerning (char code, char followingCode) |
| Vector2 | MeasureText (string text, Vector2 scale, Vector2 spacing) |
| Vector2 | MeasureText (string text, int start, int count, Vector2 scale, Vector2 spacing) |
| int | FitText (float width, string text, float scale, float spacing) |
| int | FitText (float width, string text, int start, int length, float scale, float spacing) |
| float | CalculateCharacterPosition (string text, int characterIndex, Vector2 scale, Vector2 spacing) |
| BitmapFont | Clone (float scale, Vector2 spacing) |
| void | SetKerning (char code, char followingCode, float kerning) |
|
| static BitmapFont | Initialize (Stream TextureStream, Stream GlyphsStream, Vector2? customGlyphOffset=null) |
| | 纹理图
|
| static BitmapFont | Initialize (Texture2D texture, Stream GlyphsStream, Vector2? customGlyphOffset=null) |
| static BitmapFont | Load (Image image, char firstCode, char fallbackCode, Vector2 spacing, float scale, Vector2 offset, KerningSettings kerningSettings=null, int mipLevelsCount=1, bool premultiplyAlpha=true) |
| static BitmapFont | Load (Stream stream, char firstCode, char fallbackCode, Vector2 spacing, float scale, Vector2 offset, KerningSettings kerningSettings=null, int mipLevelsCount=1, bool premultiplyAlpha=true) |
| static BitmapFont | Load (string fileName, char firstCode, char fallbackCode, Vector2 spacing, float scale, Vector2 offset, KerningSettings kerningSettings=null, int mipLevelsCount=1, bool premultiplyAlpha=true) |
| static IEnumerable< Rectangle > | FindGlyphs (Image image) |
| static int[] | ApplyKerningBulking (int[] depths, int radius, float gradient) |
| static void | CalculateKerningDepths (Image image, Rectangle rectangle, out int[] leftDepths, out int[] rightDepths) |
| static Rectangle | CropGlyph (Image image, Rectangle rectangle) |
◆ BitmapFont() [1/3]
| Engine.Media.BitmapFont.BitmapFont |
( |
Texture2D | texture, |
|
|
IEnumerable< Glyph > | glyphs, |
|
|
char | fallbackCode, |
|
|
float | glyphHeight, |
|
|
Vector2 | spacing, |
|
|
float | scale ) |
◆ BitmapFont() [2/3]
| Engine.Media.BitmapFont.BitmapFont |
( |
| ) |
|
|
staticprivate |
◆ BitmapFont() [3/3]
| Engine.Media.BitmapFont.BitmapFont |
( |
| ) |
|
|
package |
◆ ApplyKerningBulking()
| int[] Engine.Media.BitmapFont.ApplyKerningBulking |
( |
int[] | depths, |
|
|
int | radius, |
|
|
float | gradient ) |
|
static |
◆ CalculateCharacterPosition()
| float Engine.Media.BitmapFont.CalculateCharacterPosition |
( |
string | text, |
|
|
int | characterIndex, |
|
|
Vector2 | scale, |
|
|
Vector2 | spacing ) |
◆ CalculateKerningDepths()
| void Engine.Media.BitmapFont.CalculateKerningDepths |
( |
Image | image, |
|
|
Rectangle | rectangle, |
|
|
out int[] | leftDepths, |
|
|
out int[] | rightDepths ) |
|
static |
◆ Clone()
◆ CropGlyph()
◆ Dispose()
| void Engine.Media.BitmapFont.Dispose |
( |
| ) |
|
◆ FindGlyphs()
| IEnumerable< Rectangle > Engine.Media.BitmapFont.FindGlyphs |
( |
Image | image | ) |
|
|
static |
◆ FitText() [1/2]
| int Engine.Media.BitmapFont.FitText |
( |
float | width, |
|
|
string | text, |
|
|
float | scale, |
|
|
float | spacing ) |
◆ FitText() [2/2]
| int Engine.Media.BitmapFont.FitText |
( |
float | width, |
|
|
string | text, |
|
|
int | start, |
|
|
int | length, |
|
|
float | scale, |
|
|
float | spacing ) |
◆ GetGlyph()
| Glyph Engine.Media.BitmapFont.GetGlyph |
( |
char | code | ) |
|
◆ GetKerning()
| float Engine.Media.BitmapFont.GetKerning |
( |
char | code, |
|
|
char | followingCode ) |
◆ Initialize() [1/3]
| BitmapFont Engine.Media.BitmapFont.Initialize |
( |
Stream | TextureStream, |
|
|
Stream | GlyphsStream, |
|
|
Vector2? | customGlyphOffset = null ) |
|
static |
纹理图
- 参数
-
| TextureStream | 图片文件的输入流 |
| GlyphsStream | 位图数据的输入流 |
| customGlyphOffset | 自定义位图偏移 |
在文件 BitmapFont.cs 第 108 行定义.
◆ Initialize() [2/3]
| void Engine.Media.BitmapFont.Initialize |
( |
Texture2D | texture, |
|
|
Image | image, |
|
|
IEnumerable< Glyph > | glyphs, |
|
|
char | fallbackCode, |
|
|
float | glyphHeight, |
|
|
Vector2 | spacing, |
|
|
float | scale ) |
|
package |
◆ Initialize() [3/3]
◆ InternalLoad()
| BitmapFont Engine.Media.BitmapFont.InternalLoad |
( |
Image | image, |
|
|
char | firstCode, |
|
|
char | fallbackCode, |
|
|
Vector2 | spacing, |
|
|
float | scale, |
|
|
Vector2 | offset, |
|
|
KerningSettings | kerningSettings, |
|
|
int | mipLevelsCount, |
|
|
bool | premultiplyAlpha, |
|
|
bool | createTexture ) |
|
staticpackage |
◆ Load() [1/3]
| BitmapFont Engine.Media.BitmapFont.Load |
( |
Image | image, |
|
|
char | firstCode, |
|
|
char | fallbackCode, |
|
|
Vector2 | spacing, |
|
|
float | scale, |
|
|
Vector2 | offset, |
|
|
KerningSettings | kerningSettings = null, |
|
|
int | mipLevelsCount = 1, |
|
|
bool | premultiplyAlpha = true ) |
|
static |
◆ Load() [2/3]
| BitmapFont Engine.Media.BitmapFont.Load |
( |
Stream | stream, |
|
|
char | firstCode, |
|
|
char | fallbackCode, |
|
|
Vector2 | spacing, |
|
|
float | scale, |
|
|
Vector2 | offset, |
|
|
KerningSettings | kerningSettings = null, |
|
|
int | mipLevelsCount = 1, |
|
|
bool | premultiplyAlpha = true ) |
|
static |
◆ Load() [3/3]
| BitmapFont Engine.Media.BitmapFont.Load |
( |
string | fileName, |
|
|
char | firstCode, |
|
|
char | fallbackCode, |
|
|
Vector2 | spacing, |
|
|
float | scale, |
|
|
Vector2 | offset, |
|
|
KerningSettings | kerningSettings = null, |
|
|
int | mipLevelsCount = 1, |
|
|
bool | premultiplyAlpha = true ) |
|
static |
◆ MeasureText() [1/2]
| Vector2 Engine.Media.BitmapFont.MeasureText |
( |
string | text, |
|
|
int | start, |
|
|
int | count, |
|
|
Vector2 | scale, |
|
|
Vector2 | spacing ) |
◆ MeasureText() [2/2]
◆ SetKerning()
| void Engine.Media.BitmapFont.SetKerning |
( |
char | code, |
|
|
char | followingCode, |
|
|
float | kerning ) |
◆ EmptyGlyph
◆ m_debugFont
◆ m_glyphsByCode
| Glyph [] Engine.Media.BitmapFont.m_glyphsByCode |
◆ m_image
| Image Engine.Media.BitmapFont.m_image |
◆ m_kerningPairs
| Dictionary<int, short> Engine.Media.BitmapFont.m_kerningPairs |
◆ DebugFont
◆ FallbackGlyph
| Glyph Engine.Media.BitmapFont.FallbackGlyph |
|
getset |
◆ GlyphHeight
| float Engine.Media.BitmapFont.GlyphHeight |
|
getset |
◆ LineHeight
| float Engine.Media.BitmapFont.LineHeight |
|
getset |
◆ MaxGlyphCode
| char Engine.Media.BitmapFont.MaxGlyphCode |
|
getset |
◆ Scale
| float Engine.Media.BitmapFont.Scale |
|
getset |
◆ Spacing
| Vector2 Engine.Media.BitmapFont.Spacing |
|
getset |
◆ Texture
该类的文档由以下文件生成:
- E:/sc/doxygen/SurvivalcraftApi 1.8.2.3/Engine/Engine.Media/BitmapFont.cs