PixelFont
Namespace: Murder.Core.Graphics
Assembly: Murder.dll
public class PixelFont
⭐ Constructors
public PixelFont(FontAsset asset)
Parameters
asset
FontAsset
⭐ Properties
Index
public int Index;
Returns
int
LineHeight
public int LineHeight { get; }
Returns
int
PixelFontSize
public PixelFontSize PixelFontSize { get; }
Returns
PixelFontSize
⭐ Methods
GetLineWidth(ReadOnlySpan)
public float GetLineWidth(ReadOnlySpan<T> text)
Parameters
text
ReadOnlySpan<T>
Returns
float
Draw(Batch2D, RuntimeTextData, Vector2, Vector2, Vector2, float, Color, T?, T?, int, bool)
public Point Draw(Batch2D spriteBatch, RuntimeTextData data, Vector2 position, Vector2 alignment, Vector2 scale, float sort, Color color, T? strokeColor, T? shadowColor, int visibleCharacters, bool debugBox)
Parameters
spriteBatch
Batch2D
data
RuntimeTextData
position
Vector2
alignment
Vector2
scale
Vector2
sort
float
color
Color
strokeColor
T?
shadowColor
T?
visibleCharacters
int
debugBox
bool
Returns
Point
Draw(Batch2D, string, Vector2, Vector2, Vector2, float, Color, T?, T?, int, int, bool)
public Point Draw(Batch2D spriteBatch, string text, Vector2 position, Vector2 alignment, Vector2 scale, float sort, Color color, T? strokeColor, T? shadowColor, int maxWidth, int visibleCharacters, bool debugBox)
Parameters
spriteBatch
Batch2D
text
string
position
Vector2
alignment
Vector2
scale
Vector2
sort
float
color
Color
strokeColor
T?
shadowColor
T?
maxWidth
int
visibleCharacters
int
debugBox
bool
Returns
Point
DrawSimple(Batch2D, string, Vector2, Vector2, Vector2, float, Color, T?, T?, bool)
public Point DrawSimple(Batch2D spriteBatch, string text, Vector2 position, Vector2 alignment, Vector2 scale, float sort, Color color, T? strokeColor, T? shadowColor, bool debugBox)
Parameters
spriteBatch
Batch2D
text
string
position
Vector2
alignment
Vector2
scale
Vector2
sort
float
color
Color
strokeColor
T?
shadowColor
T?
debugBox
bool
Returns
Point
Escape(string)
public string Escape(string text)
Parameters
text
string
Returns
string
Preload()
public void Preload()
⚡