FerretEngine/src/Graphics/FeDraw.cs
/// <summary>
/// Draws a colored string and returns its width and height.
/// </summary>
/// <param name="text"></param>
/// <param name="position"></param>
/// <returns></returns>
Draws a colored string and returns its width and height.
Draws a colored string and returns its width and height .
[MethodImpl(MethodImplOptions.AggressiveInlining)]
        public static Vector2 TextExt(string text, Vector2 position, Color color)
        {
            if (text == null)
                throw new ArgumentNullException(nameof(text));
            if (text.Contains("\n"))
                return DrawTextMultiLine(text, position, color);
            return DrawTextSingleLine(text, position, color);
        }
[ MethodImpl ( MethodImplOptions . AggressiveInlining ) ] public static Vector2 TextExt ( string text , Vector2 position , Color color ) { if ( text == null ) throw new ArgumentNullException ( nameof ( text ) ) ; if ( text . Contains ( " \n " ) ) return DrawTextMultiLine ( text , position , color ) ; return DrawTextSingleLine ( text , position , color ) ; }
Draws a colored string and returns its width and height.
Draws a colored string and returns its width and height .
None
text
string
None
position
Vector2
None
color
Color