PixelFontSize
Namespace: Murder.Core.Graphics
Assembly: Murder.dll
public class PixelFontSize
⭐ Constructors
public PixelFontSize()
⭐ Properties
BaseLine
public float BaseLine;
Returns
float
Characters
public Dictionary<TKey, TValue> Characters;
Returns
Dictionary<TKey, TValue>
Index
public int Index { get; public set; }
Index of the font that this belongs to.
Returns
int
LineHeight
public int LineHeight;
Returns
int
Offset
public Point Offset;
Returns
Point
Textures
public MurderTexture[] Textures;
Returns
MurderTexture[]
⭐ Methods
HeightOf(string)
public float HeightOf(string text)
Parameters
text string
Returns
float
WidthToNextLine(ReadOnlySpan, int, bool)
public float WidthToNextLine(ReadOnlySpan<T> text, int start, bool trimWhitespace)
Parameters
text ReadOnlySpan<T>
start int
trimWhitespace bool
Returns
float
Draw(RuntimeTextData, Batch2D, Vector2, Vector2, Vector2, int, float, Color, T?, T?, bool)
public Point Draw(RuntimeTextData data, Batch2D spriteBatch, Vector2 position, Vector2 origin, Vector2 scale, int visibleCharacters, float sort, Color color, T? strokeColor, T? shadowColor, bool debugBox)
Parameters
data RuntimeTextData
spriteBatch Batch2D
position Vector2
origin Vector2
scale Vector2
visibleCharacters int
sort float
color Color
strokeColor T?
shadowColor T?
debugBox bool
Returns
Point
Draw(string, Batch2D, Vector2, Vector2, Vector2, int, float, Color, T?, T?, int, bool)
public Point Draw(string text, Batch2D spriteBatch, Vector2 position, Vector2 origin, Vector2 scale, int visibleCharacters, float sort, Color color, T? strokeColor, T? shadowColor, int maxWidth, bool debugBox)
Draw a text with pixel font. If
Parameters
text string
spriteBatch Batch2D
position Vector2
origin Vector2
scale Vector2
visibleCharacters int
sort float
color Color
strokeColor T?
shadowColor T?
maxWidth int
debugBox bool
Returns
Point
DrawSimple(string, Batch2D, Vector2, Vector2, Vector2, float, Color, T?, T?, bool)
public Point DrawSimple(string text, Batch2D spriteBatch, Vector2 position, Vector2 justify, Vector2 scale, float sort, Color color, T? strokeColor, T? shadowColor, bool debugBox)
Parameters
text string
spriteBatch Batch2D
position Vector2
justify Vector2
scale Vector2
sort float
color Color
strokeColor T?
shadowColor T?
debugBox bool
Returns
Point
AutoNewline(string, int)
public string AutoNewline(string text, int width)
Parameters
text string
width int
Returns
string
WrapString(ReadOnlySpan, int, float)
public string WrapString(ReadOnlySpan<T> text, int maxWidth, float scale)
Parameters
text ReadOnlySpan<T>
maxWidth int
scale float
Returns
string
Measure(string)
public Vector2 Measure(string text)
Parameters
text string
Returns
Vector2
⚡