2
0
mirror of https://github.com/raylib-cs/raylib-cs synced 2025-09-09 03:01:41 -04:00

Testing more utils

This commit is contained in:
2021-12-17 12:31:10 +00:00
parent fa8c4ea430
commit 6d7ac90088
2 changed files with 235 additions and 38 deletions

View File

@@ -1077,24 +1077,9 @@ namespace Raylib_cs
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Image ImageText(byte* text, int fontSize, Color color);
public static Image ImageText(Utf8String text, int fontSize, Color color)
{
fixed (byte* p = text)
{
return ImageText(p, fontSize, color);
}
}
/// <summary>Create an image from text (custom sprite font)</summary>
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Image ImageTextEx(Font font, byte* text, float fontSize, float spacing, Color tint);
public static Image ImageTextEx(Font font, Utf8String text, float fontSize, float spacing, Color tint)
{
fixed (byte* p = text)
{
return ImageTextEx(font, p, fontSize, spacing, tint);
}
}
/// <summary>Convert image to POT (power-of-two)</summary>
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]