public GetLineSpacing ( uint characterSize ) : float | ||
characterSize | uint | Character size |
Результат | float |
/// <summary> /// Get spacing between two consecutive lines /// </summary> /// <param name="characterSize">Character size</param> /// <returns>Line spacing, in pixels</returns> public float GetLineSpacing(uint characterSize) { return(SFMLFont.GetLineSpacing(characterSize)); }
/// <summary> /// Draws the specified range of lines. /// </summary> /// <param name="sb">The <see cref="ISpriteBatch"/> to draw to.</param> /// <param name="font">The <see cref="Font"/> to use.</param> /// <param name="start">The index of the first line to draw.</param> /// <param name="count">The maximum of lines to draw.</param> /// <param name="screenPos">The top-left corner of the location to begin drawing the text.</param> /// <param name="defaultColor">The default font color.</param> public void Draw(ISpriteBatch sb, Font font, int start, int count, Vector2 screenPos, Color defaultColor) { var end = Math.Min(start + count, _lines.Count); for (var i = start; i < end; i++) { var curr = _lines[i]; curr.Draw(sb, font, screenPos, defaultColor); screenPos += new Vector2(0, font.GetLineSpacing()); } }
internal virtual float GetLineSpacing(int size) { return(font.GetLineSpacing((uint)size)); }