mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
5043 lines
140 KiB
C#
Generated
5043 lines
140 KiB
C#
Generated
// ------------------------------------------------------------------------------
|
|
// <auto-generated>
|
|
// This code was generated by a tool.
|
|
//
|
|
// Changes to this file may cause incorrect behavior and will be lost if
|
|
// the code is regenerated.
|
|
// </auto-generated>
|
|
// ------------------------------------------------------------------------------
|
|
|
|
using System;
|
|
using System.Runtime.CompilerServices;
|
|
using System.Runtime.InteropServices;
|
|
using HexaGen.Runtime;
|
|
using System.Numerics;
|
|
|
|
namespace Dalamud.Bindings.ImGui
|
|
{
|
|
public unsafe partial class ImGui
|
|
{
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static Vector2 CalcTextSizeA(ImFontPtr self, float size, float maxWidth, float wrapWidth, string textBegin, string textEnd, byte** remaining)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textBegin != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textBegin);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textBegin, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
byte* pStr1 = null;
|
|
int pStrSize1 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize1 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize1 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr1 = Utils.Alloc<byte>(pStrSize1 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack1 = stackalloc byte[pStrSize1 + 1];
|
|
pStr1 = pStrStack1;
|
|
}
|
|
int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1);
|
|
pStr1[pStrOffset1] = 0;
|
|
}
|
|
Vector2 ret;
|
|
CalcTextSizeANative(&ret, self, size, maxWidth, wrapWidth, pStr0, pStr1, remaining);
|
|
if (pStrSize1 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr1);
|
|
}
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
return ret;
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static Vector2 CalcTextSizeA(ImFontPtr self, float size, float maxWidth, float wrapWidth, ref byte textBegin, ReadOnlySpan<byte> textEnd)
|
|
{
|
|
fixed (byte* ptextBegin = &textBegin)
|
|
{
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
Vector2 ret;
|
|
CalcTextSizeANative(&ret, self, size, maxWidth, wrapWidth, (byte*)ptextBegin, (byte*)ptextEnd, (byte**)(default));
|
|
return ret;
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static Vector2 CalcTextSizeA(ImFontPtr self, float size, float maxWidth, float wrapWidth, ref byte textBegin, ReadOnlySpan<byte> textEnd, byte** remaining)
|
|
{
|
|
fixed (byte* ptextBegin = &textBegin)
|
|
{
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
Vector2 ret;
|
|
CalcTextSizeANative(&ret, self, size, maxWidth, wrapWidth, (byte*)ptextBegin, (byte*)ptextEnd, remaining);
|
|
return ret;
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static Vector2 CalcTextSizeA(ImFontPtr self, float size, float maxWidth, float wrapWidth, ref byte textBegin, string textEnd)
|
|
{
|
|
fixed (byte* ptextBegin = &textBegin)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
Vector2 ret;
|
|
CalcTextSizeANative(&ret, self, size, maxWidth, wrapWidth, (byte*)ptextBegin, pStr0, (byte**)(default));
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static Vector2 CalcTextSizeA(ImFontPtr self, float size, float maxWidth, float wrapWidth, ref byte textBegin, string textEnd, byte** remaining)
|
|
{
|
|
fixed (byte* ptextBegin = &textBegin)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
Vector2 ret;
|
|
CalcTextSizeANative(&ret, self, size, maxWidth, wrapWidth, (byte*)ptextBegin, pStr0, remaining);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static Vector2 CalcTextSizeA(ImFontPtr self, float size, float maxWidth, float wrapWidth, ReadOnlySpan<byte> textBegin, ref byte textEnd)
|
|
{
|
|
fixed (byte* ptextBegin = textBegin)
|
|
{
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
Vector2 ret;
|
|
CalcTextSizeANative(&ret, self, size, maxWidth, wrapWidth, (byte*)ptextBegin, (byte*)ptextEnd, (byte**)(default));
|
|
return ret;
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static Vector2 CalcTextSizeA(ImFontPtr self, float size, float maxWidth, float wrapWidth, ReadOnlySpan<byte> textBegin, ref byte textEnd, byte** remaining)
|
|
{
|
|
fixed (byte* ptextBegin = textBegin)
|
|
{
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
Vector2 ret;
|
|
CalcTextSizeANative(&ret, self, size, maxWidth, wrapWidth, (byte*)ptextBegin, (byte*)ptextEnd, remaining);
|
|
return ret;
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static Vector2 CalcTextSizeA(ImFontPtr self, float size, float maxWidth, float wrapWidth, ReadOnlySpan<byte> textBegin, string textEnd)
|
|
{
|
|
fixed (byte* ptextBegin = textBegin)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
Vector2 ret;
|
|
CalcTextSizeANative(&ret, self, size, maxWidth, wrapWidth, (byte*)ptextBegin, pStr0, (byte**)(default));
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static Vector2 CalcTextSizeA(ImFontPtr self, float size, float maxWidth, float wrapWidth, ReadOnlySpan<byte> textBegin, string textEnd, byte** remaining)
|
|
{
|
|
fixed (byte* ptextBegin = textBegin)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
Vector2 ret;
|
|
CalcTextSizeANative(&ret, self, size, maxWidth, wrapWidth, (byte*)ptextBegin, pStr0, remaining);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static Vector2 CalcTextSizeA(ImFontPtr self, float size, float maxWidth, float wrapWidth, string textBegin, ref byte textEnd)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textBegin != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textBegin);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textBegin, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
Vector2 ret;
|
|
CalcTextSizeANative(&ret, self, size, maxWidth, wrapWidth, pStr0, (byte*)ptextEnd, (byte**)(default));
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static Vector2 CalcTextSizeA(ImFontPtr self, float size, float maxWidth, float wrapWidth, string textBegin, ref byte textEnd, byte** remaining)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textBegin != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textBegin);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textBegin, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
Vector2 ret;
|
|
CalcTextSizeANative(&ret, self, size, maxWidth, wrapWidth, pStr0, (byte*)ptextEnd, remaining);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static Vector2 CalcTextSizeA(ImFontPtr self, float size, float maxWidth, float wrapWidth, string textBegin, ReadOnlySpan<byte> textEnd)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textBegin != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textBegin);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textBegin, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
Vector2 ret;
|
|
CalcTextSizeANative(&ret, self, size, maxWidth, wrapWidth, pStr0, (byte*)ptextEnd, (byte**)(default));
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static Vector2 CalcTextSizeA(ImFontPtr self, float size, float maxWidth, float wrapWidth, string textBegin, ReadOnlySpan<byte> textEnd, byte** remaining)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textBegin != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textBegin);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textBegin, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
Vector2 ret;
|
|
CalcTextSizeANative(&ret, self, size, maxWidth, wrapWidth, pStr0, (byte*)ptextEnd, remaining);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(ref Vector2 pOut, ImFontPtr self, float size, float maxWidth, float wrapWidth, ref byte textBegin, ref byte textEnd, byte** remaining)
|
|
{
|
|
fixed (Vector2* ppOut = &pOut)
|
|
{
|
|
fixed (byte* ptextBegin = &textBegin)
|
|
{
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
CalcTextSizeANative((Vector2*)ppOut, self, size, maxWidth, wrapWidth, (byte*)ptextBegin, (byte*)ptextEnd, remaining);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(ref Vector2 pOut, ImFontPtr self, float size, float maxWidth, float wrapWidth, ref byte textBegin, ref byte textEnd)
|
|
{
|
|
fixed (Vector2* ppOut = &pOut)
|
|
{
|
|
fixed (byte* ptextBegin = &textBegin)
|
|
{
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
CalcTextSizeANative((Vector2*)ppOut, self, size, maxWidth, wrapWidth, (byte*)ptextBegin, (byte*)ptextEnd, (byte**)(default));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(ref Vector2 pOut, ImFontPtr self, float size, float maxWidth, float wrapWidth, ReadOnlySpan<byte> textBegin, ReadOnlySpan<byte> textEnd, byte** remaining)
|
|
{
|
|
fixed (Vector2* ppOut = &pOut)
|
|
{
|
|
fixed (byte* ptextBegin = textBegin)
|
|
{
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
CalcTextSizeANative((Vector2*)ppOut, self, size, maxWidth, wrapWidth, (byte*)ptextBegin, (byte*)ptextEnd, remaining);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(ref Vector2 pOut, ImFontPtr self, float size, float maxWidth, float wrapWidth, ReadOnlySpan<byte> textBegin, ReadOnlySpan<byte> textEnd)
|
|
{
|
|
fixed (Vector2* ppOut = &pOut)
|
|
{
|
|
fixed (byte* ptextBegin = textBegin)
|
|
{
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
CalcTextSizeANative((Vector2*)ppOut, self, size, maxWidth, wrapWidth, (byte*)ptextBegin, (byte*)ptextEnd, (byte**)(default));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(ref Vector2 pOut, ImFontPtr self, float size, float maxWidth, float wrapWidth, string textBegin, string textEnd, byte** remaining)
|
|
{
|
|
fixed (Vector2* ppOut = &pOut)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textBegin != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textBegin);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textBegin, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
byte* pStr1 = null;
|
|
int pStrSize1 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize1 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize1 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr1 = Utils.Alloc<byte>(pStrSize1 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack1 = stackalloc byte[pStrSize1 + 1];
|
|
pStr1 = pStrStack1;
|
|
}
|
|
int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1);
|
|
pStr1[pStrOffset1] = 0;
|
|
}
|
|
CalcTextSizeANative((Vector2*)ppOut, self, size, maxWidth, wrapWidth, pStr0, pStr1, remaining);
|
|
if (pStrSize1 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr1);
|
|
}
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(ref Vector2 pOut, ImFontPtr self, float size, float maxWidth, float wrapWidth, string textBegin, string textEnd)
|
|
{
|
|
fixed (Vector2* ppOut = &pOut)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textBegin != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textBegin);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textBegin, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
byte* pStr1 = null;
|
|
int pStrSize1 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize1 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize1 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr1 = Utils.Alloc<byte>(pStrSize1 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack1 = stackalloc byte[pStrSize1 + 1];
|
|
pStr1 = pStrStack1;
|
|
}
|
|
int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1);
|
|
pStr1[pStrOffset1] = 0;
|
|
}
|
|
CalcTextSizeANative((Vector2*)ppOut, self, size, maxWidth, wrapWidth, pStr0, pStr1, (byte**)(default));
|
|
if (pStrSize1 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr1);
|
|
}
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(ref Vector2 pOut, ImFontPtr self, float size, float maxWidth, float wrapWidth, ref byte textBegin, ReadOnlySpan<byte> textEnd, byte** remaining)
|
|
{
|
|
fixed (Vector2* ppOut = &pOut)
|
|
{
|
|
fixed (byte* ptextBegin = &textBegin)
|
|
{
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
CalcTextSizeANative((Vector2*)ppOut, self, size, maxWidth, wrapWidth, (byte*)ptextBegin, (byte*)ptextEnd, remaining);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(ref Vector2 pOut, ImFontPtr self, float size, float maxWidth, float wrapWidth, ref byte textBegin, ReadOnlySpan<byte> textEnd)
|
|
{
|
|
fixed (Vector2* ppOut = &pOut)
|
|
{
|
|
fixed (byte* ptextBegin = &textBegin)
|
|
{
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
CalcTextSizeANative((Vector2*)ppOut, self, size, maxWidth, wrapWidth, (byte*)ptextBegin, (byte*)ptextEnd, (byte**)(default));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(ref Vector2 pOut, ImFontPtr self, float size, float maxWidth, float wrapWidth, ref byte textBegin, string textEnd, byte** remaining)
|
|
{
|
|
fixed (Vector2* ppOut = &pOut)
|
|
{
|
|
fixed (byte* ptextBegin = &textBegin)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
CalcTextSizeANative((Vector2*)ppOut, self, size, maxWidth, wrapWidth, (byte*)ptextBegin, pStr0, remaining);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(ref Vector2 pOut, ImFontPtr self, float size, float maxWidth, float wrapWidth, ref byte textBegin, string textEnd)
|
|
{
|
|
fixed (Vector2* ppOut = &pOut)
|
|
{
|
|
fixed (byte* ptextBegin = &textBegin)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
CalcTextSizeANative((Vector2*)ppOut, self, size, maxWidth, wrapWidth, (byte*)ptextBegin, pStr0, (byte**)(default));
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(ref Vector2 pOut, ImFontPtr self, float size, float maxWidth, float wrapWidth, ReadOnlySpan<byte> textBegin, ref byte textEnd, byte** remaining)
|
|
{
|
|
fixed (Vector2* ppOut = &pOut)
|
|
{
|
|
fixed (byte* ptextBegin = textBegin)
|
|
{
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
CalcTextSizeANative((Vector2*)ppOut, self, size, maxWidth, wrapWidth, (byte*)ptextBegin, (byte*)ptextEnd, remaining);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(ref Vector2 pOut, ImFontPtr self, float size, float maxWidth, float wrapWidth, ReadOnlySpan<byte> textBegin, ref byte textEnd)
|
|
{
|
|
fixed (Vector2* ppOut = &pOut)
|
|
{
|
|
fixed (byte* ptextBegin = textBegin)
|
|
{
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
CalcTextSizeANative((Vector2*)ppOut, self, size, maxWidth, wrapWidth, (byte*)ptextBegin, (byte*)ptextEnd, (byte**)(default));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(ref Vector2 pOut, ImFontPtr self, float size, float maxWidth, float wrapWidth, ReadOnlySpan<byte> textBegin, string textEnd, byte** remaining)
|
|
{
|
|
fixed (Vector2* ppOut = &pOut)
|
|
{
|
|
fixed (byte* ptextBegin = textBegin)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
CalcTextSizeANative((Vector2*)ppOut, self, size, maxWidth, wrapWidth, (byte*)ptextBegin, pStr0, remaining);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(ref Vector2 pOut, ImFontPtr self, float size, float maxWidth, float wrapWidth, ReadOnlySpan<byte> textBegin, string textEnd)
|
|
{
|
|
fixed (Vector2* ppOut = &pOut)
|
|
{
|
|
fixed (byte* ptextBegin = textBegin)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
CalcTextSizeANative((Vector2*)ppOut, self, size, maxWidth, wrapWidth, (byte*)ptextBegin, pStr0, (byte**)(default));
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(ref Vector2 pOut, ImFontPtr self, float size, float maxWidth, float wrapWidth, string textBegin, ref byte textEnd, byte** remaining)
|
|
{
|
|
fixed (Vector2* ppOut = &pOut)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textBegin != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textBegin);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textBegin, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
CalcTextSizeANative((Vector2*)ppOut, self, size, maxWidth, wrapWidth, pStr0, (byte*)ptextEnd, remaining);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(ref Vector2 pOut, ImFontPtr self, float size, float maxWidth, float wrapWidth, string textBegin, ref byte textEnd)
|
|
{
|
|
fixed (Vector2* ppOut = &pOut)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textBegin != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textBegin);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textBegin, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
CalcTextSizeANative((Vector2*)ppOut, self, size, maxWidth, wrapWidth, pStr0, (byte*)ptextEnd, (byte**)(default));
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(ref Vector2 pOut, ImFontPtr self, float size, float maxWidth, float wrapWidth, string textBegin, ReadOnlySpan<byte> textEnd, byte** remaining)
|
|
{
|
|
fixed (Vector2* ppOut = &pOut)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textBegin != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textBegin);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textBegin, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
CalcTextSizeANative((Vector2*)ppOut, self, size, maxWidth, wrapWidth, pStr0, (byte*)ptextEnd, remaining);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(ref Vector2 pOut, ImFontPtr self, float size, float maxWidth, float wrapWidth, string textBegin, ReadOnlySpan<byte> textEnd)
|
|
{
|
|
fixed (Vector2* ppOut = &pOut)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textBegin != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textBegin);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textBegin, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
CalcTextSizeANative((Vector2*)ppOut, self, size, maxWidth, wrapWidth, pStr0, (byte*)ptextEnd, (byte**)(default));
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static Vector2 CalcTextSizeA(ref ImFont self, float size, float maxWidth, float wrapWidth, ref byte textBegin, ref byte textEnd)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
fixed (byte* ptextBegin = &textBegin)
|
|
{
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
Vector2 ret;
|
|
CalcTextSizeANative(&ret, (ImFont*)pself, size, maxWidth, wrapWidth, (byte*)ptextBegin, (byte*)ptextEnd, (byte**)(default));
|
|
return ret;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static Vector2 CalcTextSizeA(ref ImFont self, float size, float maxWidth, float wrapWidth, ref byte textBegin, ref byte textEnd, byte** remaining)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
fixed (byte* ptextBegin = &textBegin)
|
|
{
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
Vector2 ret;
|
|
CalcTextSizeANative(&ret, (ImFont*)pself, size, maxWidth, wrapWidth, (byte*)ptextBegin, (byte*)ptextEnd, remaining);
|
|
return ret;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static Vector2 CalcTextSizeA(ref ImFont self, float size, float maxWidth, float wrapWidth, ReadOnlySpan<byte> textBegin, ReadOnlySpan<byte> textEnd)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
fixed (byte* ptextBegin = textBegin)
|
|
{
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
Vector2 ret;
|
|
CalcTextSizeANative(&ret, (ImFont*)pself, size, maxWidth, wrapWidth, (byte*)ptextBegin, (byte*)ptextEnd, (byte**)(default));
|
|
return ret;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static Vector2 CalcTextSizeA(ref ImFont self, float size, float maxWidth, float wrapWidth, ReadOnlySpan<byte> textBegin, ReadOnlySpan<byte> textEnd, byte** remaining)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
fixed (byte* ptextBegin = textBegin)
|
|
{
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
Vector2 ret;
|
|
CalcTextSizeANative(&ret, (ImFont*)pself, size, maxWidth, wrapWidth, (byte*)ptextBegin, (byte*)ptextEnd, remaining);
|
|
return ret;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static Vector2 CalcTextSizeA(ref ImFont self, float size, float maxWidth, float wrapWidth, string textBegin, string textEnd)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textBegin != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textBegin);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textBegin, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
byte* pStr1 = null;
|
|
int pStrSize1 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize1 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize1 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr1 = Utils.Alloc<byte>(pStrSize1 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack1 = stackalloc byte[pStrSize1 + 1];
|
|
pStr1 = pStrStack1;
|
|
}
|
|
int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1);
|
|
pStr1[pStrOffset1] = 0;
|
|
}
|
|
Vector2 ret;
|
|
CalcTextSizeANative(&ret, (ImFont*)pself, size, maxWidth, wrapWidth, pStr0, pStr1, (byte**)(default));
|
|
if (pStrSize1 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr1);
|
|
}
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static Vector2 CalcTextSizeA(ref ImFont self, float size, float maxWidth, float wrapWidth, string textBegin, string textEnd, byte** remaining)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textBegin != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textBegin);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textBegin, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
byte* pStr1 = null;
|
|
int pStrSize1 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize1 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize1 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr1 = Utils.Alloc<byte>(pStrSize1 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack1 = stackalloc byte[pStrSize1 + 1];
|
|
pStr1 = pStrStack1;
|
|
}
|
|
int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1);
|
|
pStr1[pStrOffset1] = 0;
|
|
}
|
|
Vector2 ret;
|
|
CalcTextSizeANative(&ret, (ImFont*)pself, size, maxWidth, wrapWidth, pStr0, pStr1, remaining);
|
|
if (pStrSize1 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr1);
|
|
}
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static Vector2 CalcTextSizeA(ref ImFont self, float size, float maxWidth, float wrapWidth, ref byte textBegin, ReadOnlySpan<byte> textEnd)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
fixed (byte* ptextBegin = &textBegin)
|
|
{
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
Vector2 ret;
|
|
CalcTextSizeANative(&ret, (ImFont*)pself, size, maxWidth, wrapWidth, (byte*)ptextBegin, (byte*)ptextEnd, (byte**)(default));
|
|
return ret;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static Vector2 CalcTextSizeA(ref ImFont self, float size, float maxWidth, float wrapWidth, ref byte textBegin, ReadOnlySpan<byte> textEnd, byte** remaining)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
fixed (byte* ptextBegin = &textBegin)
|
|
{
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
Vector2 ret;
|
|
CalcTextSizeANative(&ret, (ImFont*)pself, size, maxWidth, wrapWidth, (byte*)ptextBegin, (byte*)ptextEnd, remaining);
|
|
return ret;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static Vector2 CalcTextSizeA(ref ImFont self, float size, float maxWidth, float wrapWidth, ref byte textBegin, string textEnd)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
fixed (byte* ptextBegin = &textBegin)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
Vector2 ret;
|
|
CalcTextSizeANative(&ret, (ImFont*)pself, size, maxWidth, wrapWidth, (byte*)ptextBegin, pStr0, (byte**)(default));
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
return ret;
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static Vector2 CalcTextSizeA(ref ImFont self, float size, float maxWidth, float wrapWidth, ref byte textBegin, string textEnd, byte** remaining)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
fixed (byte* ptextBegin = &textBegin)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
Vector2 ret;
|
|
CalcTextSizeANative(&ret, (ImFont*)pself, size, maxWidth, wrapWidth, (byte*)ptextBegin, pStr0, remaining);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
return ret;
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static Vector2 CalcTextSizeA(ref ImFont self, float size, float maxWidth, float wrapWidth, ReadOnlySpan<byte> textBegin, ref byte textEnd)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
fixed (byte* ptextBegin = textBegin)
|
|
{
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
Vector2 ret;
|
|
CalcTextSizeANative(&ret, (ImFont*)pself, size, maxWidth, wrapWidth, (byte*)ptextBegin, (byte*)ptextEnd, (byte**)(default));
|
|
return ret;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static Vector2 CalcTextSizeA(ref ImFont self, float size, float maxWidth, float wrapWidth, ReadOnlySpan<byte> textBegin, ref byte textEnd, byte** remaining)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
fixed (byte* ptextBegin = textBegin)
|
|
{
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
Vector2 ret;
|
|
CalcTextSizeANative(&ret, (ImFont*)pself, size, maxWidth, wrapWidth, (byte*)ptextBegin, (byte*)ptextEnd, remaining);
|
|
return ret;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static Vector2 CalcTextSizeA(ref ImFont self, float size, float maxWidth, float wrapWidth, ReadOnlySpan<byte> textBegin, string textEnd)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
fixed (byte* ptextBegin = textBegin)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
Vector2 ret;
|
|
CalcTextSizeANative(&ret, (ImFont*)pself, size, maxWidth, wrapWidth, (byte*)ptextBegin, pStr0, (byte**)(default));
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
return ret;
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static Vector2 CalcTextSizeA(ref ImFont self, float size, float maxWidth, float wrapWidth, ReadOnlySpan<byte> textBegin, string textEnd, byte** remaining)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
fixed (byte* ptextBegin = textBegin)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
Vector2 ret;
|
|
CalcTextSizeANative(&ret, (ImFont*)pself, size, maxWidth, wrapWidth, (byte*)ptextBegin, pStr0, remaining);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
return ret;
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static Vector2 CalcTextSizeA(ref ImFont self, float size, float maxWidth, float wrapWidth, string textBegin, ref byte textEnd)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textBegin != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textBegin);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textBegin, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
Vector2 ret;
|
|
CalcTextSizeANative(&ret, (ImFont*)pself, size, maxWidth, wrapWidth, pStr0, (byte*)ptextEnd, (byte**)(default));
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
return ret;
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static Vector2 CalcTextSizeA(ref ImFont self, float size, float maxWidth, float wrapWidth, string textBegin, ref byte textEnd, byte** remaining)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textBegin != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textBegin);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textBegin, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
Vector2 ret;
|
|
CalcTextSizeANative(&ret, (ImFont*)pself, size, maxWidth, wrapWidth, pStr0, (byte*)ptextEnd, remaining);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
return ret;
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static Vector2 CalcTextSizeA(ref ImFont self, float size, float maxWidth, float wrapWidth, string textBegin, ReadOnlySpan<byte> textEnd)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textBegin != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textBegin);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textBegin, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
Vector2 ret;
|
|
CalcTextSizeANative(&ret, (ImFont*)pself, size, maxWidth, wrapWidth, pStr0, (byte*)ptextEnd, (byte**)(default));
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
return ret;
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static Vector2 CalcTextSizeA(ref ImFont self, float size, float maxWidth, float wrapWidth, string textBegin, ReadOnlySpan<byte> textEnd, byte** remaining)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textBegin != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textBegin);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textBegin, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
Vector2 ret;
|
|
CalcTextSizeANative(&ret, (ImFont*)pself, size, maxWidth, wrapWidth, pStr0, (byte*)ptextEnd, remaining);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
return ret;
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(ref Vector2 pOut, ref ImFont self, float size, float maxWidth, float wrapWidth, ref byte textBegin, ref byte textEnd, byte** remaining)
|
|
{
|
|
fixed (Vector2* ppOut = &pOut)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
fixed (byte* ptextBegin = &textBegin)
|
|
{
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
CalcTextSizeANative((Vector2*)ppOut, (ImFont*)pself, size, maxWidth, wrapWidth, (byte*)ptextBegin, (byte*)ptextEnd, remaining);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(ref Vector2 pOut, ref ImFont self, float size, float maxWidth, float wrapWidth, ref byte textBegin, ref byte textEnd)
|
|
{
|
|
fixed (Vector2* ppOut = &pOut)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
fixed (byte* ptextBegin = &textBegin)
|
|
{
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
CalcTextSizeANative((Vector2*)ppOut, (ImFont*)pself, size, maxWidth, wrapWidth, (byte*)ptextBegin, (byte*)ptextEnd, (byte**)(default));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(ref Vector2 pOut, ref ImFont self, float size, float maxWidth, float wrapWidth, ReadOnlySpan<byte> textBegin, ReadOnlySpan<byte> textEnd, byte** remaining)
|
|
{
|
|
fixed (Vector2* ppOut = &pOut)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
fixed (byte* ptextBegin = textBegin)
|
|
{
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
CalcTextSizeANative((Vector2*)ppOut, (ImFont*)pself, size, maxWidth, wrapWidth, (byte*)ptextBegin, (byte*)ptextEnd, remaining);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(ref Vector2 pOut, ref ImFont self, float size, float maxWidth, float wrapWidth, ReadOnlySpan<byte> textBegin, ReadOnlySpan<byte> textEnd)
|
|
{
|
|
fixed (Vector2* ppOut = &pOut)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
fixed (byte* ptextBegin = textBegin)
|
|
{
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
CalcTextSizeANative((Vector2*)ppOut, (ImFont*)pself, size, maxWidth, wrapWidth, (byte*)ptextBegin, (byte*)ptextEnd, (byte**)(default));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(ref Vector2 pOut, ref ImFont self, float size, float maxWidth, float wrapWidth, string textBegin, string textEnd, byte** remaining)
|
|
{
|
|
fixed (Vector2* ppOut = &pOut)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textBegin != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textBegin);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textBegin, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
byte* pStr1 = null;
|
|
int pStrSize1 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize1 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize1 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr1 = Utils.Alloc<byte>(pStrSize1 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack1 = stackalloc byte[pStrSize1 + 1];
|
|
pStr1 = pStrStack1;
|
|
}
|
|
int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1);
|
|
pStr1[pStrOffset1] = 0;
|
|
}
|
|
CalcTextSizeANative((Vector2*)ppOut, (ImFont*)pself, size, maxWidth, wrapWidth, pStr0, pStr1, remaining);
|
|
if (pStrSize1 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr1);
|
|
}
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(ref Vector2 pOut, ref ImFont self, float size, float maxWidth, float wrapWidth, string textBegin, string textEnd)
|
|
{
|
|
fixed (Vector2* ppOut = &pOut)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textBegin != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textBegin);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textBegin, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
byte* pStr1 = null;
|
|
int pStrSize1 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize1 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize1 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr1 = Utils.Alloc<byte>(pStrSize1 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack1 = stackalloc byte[pStrSize1 + 1];
|
|
pStr1 = pStrStack1;
|
|
}
|
|
int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1);
|
|
pStr1[pStrOffset1] = 0;
|
|
}
|
|
CalcTextSizeANative((Vector2*)ppOut, (ImFont*)pself, size, maxWidth, wrapWidth, pStr0, pStr1, (byte**)(default));
|
|
if (pStrSize1 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr1);
|
|
}
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(ref Vector2 pOut, ref ImFont self, float size, float maxWidth, float wrapWidth, ref byte textBegin, ReadOnlySpan<byte> textEnd, byte** remaining)
|
|
{
|
|
fixed (Vector2* ppOut = &pOut)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
fixed (byte* ptextBegin = &textBegin)
|
|
{
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
CalcTextSizeANative((Vector2*)ppOut, (ImFont*)pself, size, maxWidth, wrapWidth, (byte*)ptextBegin, (byte*)ptextEnd, remaining);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(ref Vector2 pOut, ref ImFont self, float size, float maxWidth, float wrapWidth, ref byte textBegin, ReadOnlySpan<byte> textEnd)
|
|
{
|
|
fixed (Vector2* ppOut = &pOut)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
fixed (byte* ptextBegin = &textBegin)
|
|
{
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
CalcTextSizeANative((Vector2*)ppOut, (ImFont*)pself, size, maxWidth, wrapWidth, (byte*)ptextBegin, (byte*)ptextEnd, (byte**)(default));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(ref Vector2 pOut, ref ImFont self, float size, float maxWidth, float wrapWidth, ref byte textBegin, string textEnd, byte** remaining)
|
|
{
|
|
fixed (Vector2* ppOut = &pOut)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
fixed (byte* ptextBegin = &textBegin)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
CalcTextSizeANative((Vector2*)ppOut, (ImFont*)pself, size, maxWidth, wrapWidth, (byte*)ptextBegin, pStr0, remaining);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(ref Vector2 pOut, ref ImFont self, float size, float maxWidth, float wrapWidth, ref byte textBegin, string textEnd)
|
|
{
|
|
fixed (Vector2* ppOut = &pOut)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
fixed (byte* ptextBegin = &textBegin)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
CalcTextSizeANative((Vector2*)ppOut, (ImFont*)pself, size, maxWidth, wrapWidth, (byte*)ptextBegin, pStr0, (byte**)(default));
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(ref Vector2 pOut, ref ImFont self, float size, float maxWidth, float wrapWidth, ReadOnlySpan<byte> textBegin, ref byte textEnd, byte** remaining)
|
|
{
|
|
fixed (Vector2* ppOut = &pOut)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
fixed (byte* ptextBegin = textBegin)
|
|
{
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
CalcTextSizeANative((Vector2*)ppOut, (ImFont*)pself, size, maxWidth, wrapWidth, (byte*)ptextBegin, (byte*)ptextEnd, remaining);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(ref Vector2 pOut, ref ImFont self, float size, float maxWidth, float wrapWidth, ReadOnlySpan<byte> textBegin, ref byte textEnd)
|
|
{
|
|
fixed (Vector2* ppOut = &pOut)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
fixed (byte* ptextBegin = textBegin)
|
|
{
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
CalcTextSizeANative((Vector2*)ppOut, (ImFont*)pself, size, maxWidth, wrapWidth, (byte*)ptextBegin, (byte*)ptextEnd, (byte**)(default));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(ref Vector2 pOut, ref ImFont self, float size, float maxWidth, float wrapWidth, ReadOnlySpan<byte> textBegin, string textEnd, byte** remaining)
|
|
{
|
|
fixed (Vector2* ppOut = &pOut)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
fixed (byte* ptextBegin = textBegin)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
CalcTextSizeANative((Vector2*)ppOut, (ImFont*)pself, size, maxWidth, wrapWidth, (byte*)ptextBegin, pStr0, remaining);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(ref Vector2 pOut, ref ImFont self, float size, float maxWidth, float wrapWidth, ReadOnlySpan<byte> textBegin, string textEnd)
|
|
{
|
|
fixed (Vector2* ppOut = &pOut)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
fixed (byte* ptextBegin = textBegin)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
CalcTextSizeANative((Vector2*)ppOut, (ImFont*)pself, size, maxWidth, wrapWidth, (byte*)ptextBegin, pStr0, (byte**)(default));
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(ref Vector2 pOut, ref ImFont self, float size, float maxWidth, float wrapWidth, string textBegin, ref byte textEnd, byte** remaining)
|
|
{
|
|
fixed (Vector2* ppOut = &pOut)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textBegin != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textBegin);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textBegin, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
CalcTextSizeANative((Vector2*)ppOut, (ImFont*)pself, size, maxWidth, wrapWidth, pStr0, (byte*)ptextEnd, remaining);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(ref Vector2 pOut, ref ImFont self, float size, float maxWidth, float wrapWidth, string textBegin, ref byte textEnd)
|
|
{
|
|
fixed (Vector2* ppOut = &pOut)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textBegin != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textBegin);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textBegin, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
CalcTextSizeANative((Vector2*)ppOut, (ImFont*)pself, size, maxWidth, wrapWidth, pStr0, (byte*)ptextEnd, (byte**)(default));
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(ref Vector2 pOut, ref ImFont self, float size, float maxWidth, float wrapWidth, string textBegin, ReadOnlySpan<byte> textEnd, byte** remaining)
|
|
{
|
|
fixed (Vector2* ppOut = &pOut)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textBegin != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textBegin);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textBegin, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
CalcTextSizeANative((Vector2*)ppOut, (ImFont*)pself, size, maxWidth, wrapWidth, pStr0, (byte*)ptextEnd, remaining);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(ref Vector2 pOut, ref ImFont self, float size, float maxWidth, float wrapWidth, string textBegin, ReadOnlySpan<byte> textEnd)
|
|
{
|
|
fixed (Vector2* ppOut = &pOut)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textBegin != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textBegin);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textBegin, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
CalcTextSizeANative((Vector2*)ppOut, (ImFont*)pself, size, maxWidth, wrapWidth, pStr0, (byte*)ptextEnd, (byte**)(default));
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(Vector2* pOut, ImFontPtr self, float size, float maxWidth, float wrapWidth, ref byte textBegin, ref byte textEnd, byte** remaining)
|
|
{
|
|
fixed (byte* ptextBegin = &textBegin)
|
|
{
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
CalcTextSizeANative(pOut, self, size, maxWidth, wrapWidth, (byte*)ptextBegin, (byte*)ptextEnd, remaining);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(Vector2* pOut, ImFontPtr self, float size, float maxWidth, float wrapWidth, ref byte textBegin, ref byte textEnd)
|
|
{
|
|
fixed (byte* ptextBegin = &textBegin)
|
|
{
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
CalcTextSizeANative(pOut, self, size, maxWidth, wrapWidth, (byte*)ptextBegin, (byte*)ptextEnd, (byte**)(default));
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(Vector2* pOut, ImFontPtr self, float size, float maxWidth, float wrapWidth, ReadOnlySpan<byte> textBegin, ReadOnlySpan<byte> textEnd, byte** remaining)
|
|
{
|
|
fixed (byte* ptextBegin = textBegin)
|
|
{
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
CalcTextSizeANative(pOut, self, size, maxWidth, wrapWidth, (byte*)ptextBegin, (byte*)ptextEnd, remaining);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(Vector2* pOut, ImFontPtr self, float size, float maxWidth, float wrapWidth, ReadOnlySpan<byte> textBegin, ReadOnlySpan<byte> textEnd)
|
|
{
|
|
fixed (byte* ptextBegin = textBegin)
|
|
{
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
CalcTextSizeANative(pOut, self, size, maxWidth, wrapWidth, (byte*)ptextBegin, (byte*)ptextEnd, (byte**)(default));
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(Vector2* pOut, ImFontPtr self, float size, float maxWidth, float wrapWidth, string textBegin, string textEnd, byte** remaining)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textBegin != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textBegin);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textBegin, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
byte* pStr1 = null;
|
|
int pStrSize1 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize1 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize1 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr1 = Utils.Alloc<byte>(pStrSize1 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack1 = stackalloc byte[pStrSize1 + 1];
|
|
pStr1 = pStrStack1;
|
|
}
|
|
int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1);
|
|
pStr1[pStrOffset1] = 0;
|
|
}
|
|
CalcTextSizeANative(pOut, self, size, maxWidth, wrapWidth, pStr0, pStr1, remaining);
|
|
if (pStrSize1 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr1);
|
|
}
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(Vector2* pOut, ImFontPtr self, float size, float maxWidth, float wrapWidth, string textBegin, string textEnd)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textBegin != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textBegin);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textBegin, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
byte* pStr1 = null;
|
|
int pStrSize1 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize1 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize1 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr1 = Utils.Alloc<byte>(pStrSize1 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack1 = stackalloc byte[pStrSize1 + 1];
|
|
pStr1 = pStrStack1;
|
|
}
|
|
int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1);
|
|
pStr1[pStrOffset1] = 0;
|
|
}
|
|
CalcTextSizeANative(pOut, self, size, maxWidth, wrapWidth, pStr0, pStr1, (byte**)(default));
|
|
if (pStrSize1 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr1);
|
|
}
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(Vector2* pOut, ImFontPtr self, float size, float maxWidth, float wrapWidth, ref byte textBegin, ReadOnlySpan<byte> textEnd, byte** remaining)
|
|
{
|
|
fixed (byte* ptextBegin = &textBegin)
|
|
{
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
CalcTextSizeANative(pOut, self, size, maxWidth, wrapWidth, (byte*)ptextBegin, (byte*)ptextEnd, remaining);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(Vector2* pOut, ImFontPtr self, float size, float maxWidth, float wrapWidth, ref byte textBegin, ReadOnlySpan<byte> textEnd)
|
|
{
|
|
fixed (byte* ptextBegin = &textBegin)
|
|
{
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
CalcTextSizeANative(pOut, self, size, maxWidth, wrapWidth, (byte*)ptextBegin, (byte*)ptextEnd, (byte**)(default));
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(Vector2* pOut, ImFontPtr self, float size, float maxWidth, float wrapWidth, ref byte textBegin, string textEnd, byte** remaining)
|
|
{
|
|
fixed (byte* ptextBegin = &textBegin)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
CalcTextSizeANative(pOut, self, size, maxWidth, wrapWidth, (byte*)ptextBegin, pStr0, remaining);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(Vector2* pOut, ImFontPtr self, float size, float maxWidth, float wrapWidth, ref byte textBegin, string textEnd)
|
|
{
|
|
fixed (byte* ptextBegin = &textBegin)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
CalcTextSizeANative(pOut, self, size, maxWidth, wrapWidth, (byte*)ptextBegin, pStr0, (byte**)(default));
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(Vector2* pOut, ImFontPtr self, float size, float maxWidth, float wrapWidth, ReadOnlySpan<byte> textBegin, ref byte textEnd, byte** remaining)
|
|
{
|
|
fixed (byte* ptextBegin = textBegin)
|
|
{
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
CalcTextSizeANative(pOut, self, size, maxWidth, wrapWidth, (byte*)ptextBegin, (byte*)ptextEnd, remaining);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(Vector2* pOut, ImFontPtr self, float size, float maxWidth, float wrapWidth, ReadOnlySpan<byte> textBegin, ref byte textEnd)
|
|
{
|
|
fixed (byte* ptextBegin = textBegin)
|
|
{
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
CalcTextSizeANative(pOut, self, size, maxWidth, wrapWidth, (byte*)ptextBegin, (byte*)ptextEnd, (byte**)(default));
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(Vector2* pOut, ImFontPtr self, float size, float maxWidth, float wrapWidth, ReadOnlySpan<byte> textBegin, string textEnd, byte** remaining)
|
|
{
|
|
fixed (byte* ptextBegin = textBegin)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
CalcTextSizeANative(pOut, self, size, maxWidth, wrapWidth, (byte*)ptextBegin, pStr0, remaining);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(Vector2* pOut, ImFontPtr self, float size, float maxWidth, float wrapWidth, ReadOnlySpan<byte> textBegin, string textEnd)
|
|
{
|
|
fixed (byte* ptextBegin = textBegin)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
CalcTextSizeANative(pOut, self, size, maxWidth, wrapWidth, (byte*)ptextBegin, pStr0, (byte**)(default));
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(Vector2* pOut, ImFontPtr self, float size, float maxWidth, float wrapWidth, string textBegin, ref byte textEnd, byte** remaining)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textBegin != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textBegin);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textBegin, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
CalcTextSizeANative(pOut, self, size, maxWidth, wrapWidth, pStr0, (byte*)ptextEnd, remaining);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(Vector2* pOut, ImFontPtr self, float size, float maxWidth, float wrapWidth, string textBegin, ref byte textEnd)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textBegin != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textBegin);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textBegin, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
CalcTextSizeANative(pOut, self, size, maxWidth, wrapWidth, pStr0, (byte*)ptextEnd, (byte**)(default));
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(Vector2* pOut, ImFontPtr self, float size, float maxWidth, float wrapWidth, string textBegin, ReadOnlySpan<byte> textEnd, byte** remaining)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textBegin != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textBegin);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textBegin, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
CalcTextSizeANative(pOut, self, size, maxWidth, wrapWidth, pStr0, (byte*)ptextEnd, remaining);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(Vector2* pOut, ImFontPtr self, float size, float maxWidth, float wrapWidth, string textBegin, ReadOnlySpan<byte> textEnd)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textBegin != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textBegin);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textBegin, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
CalcTextSizeANative(pOut, self, size, maxWidth, wrapWidth, pStr0, (byte*)ptextEnd, (byte**)(default));
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(Vector2* pOut, ref ImFont self, float size, float maxWidth, float wrapWidth, ref byte textBegin, ref byte textEnd, byte** remaining)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
fixed (byte* ptextBegin = &textBegin)
|
|
{
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
CalcTextSizeANative(pOut, (ImFont*)pself, size, maxWidth, wrapWidth, (byte*)ptextBegin, (byte*)ptextEnd, remaining);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(Vector2* pOut, ref ImFont self, float size, float maxWidth, float wrapWidth, ref byte textBegin, ref byte textEnd)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
fixed (byte* ptextBegin = &textBegin)
|
|
{
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
CalcTextSizeANative(pOut, (ImFont*)pself, size, maxWidth, wrapWidth, (byte*)ptextBegin, (byte*)ptextEnd, (byte**)(default));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(Vector2* pOut, ref ImFont self, float size, float maxWidth, float wrapWidth, ReadOnlySpan<byte> textBegin, ReadOnlySpan<byte> textEnd, byte** remaining)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
fixed (byte* ptextBegin = textBegin)
|
|
{
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
CalcTextSizeANative(pOut, (ImFont*)pself, size, maxWidth, wrapWidth, (byte*)ptextBegin, (byte*)ptextEnd, remaining);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(Vector2* pOut, ref ImFont self, float size, float maxWidth, float wrapWidth, ReadOnlySpan<byte> textBegin, ReadOnlySpan<byte> textEnd)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
fixed (byte* ptextBegin = textBegin)
|
|
{
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
CalcTextSizeANative(pOut, (ImFont*)pself, size, maxWidth, wrapWidth, (byte*)ptextBegin, (byte*)ptextEnd, (byte**)(default));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(Vector2* pOut, ref ImFont self, float size, float maxWidth, float wrapWidth, string textBegin, string textEnd, byte** remaining)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textBegin != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textBegin);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textBegin, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
byte* pStr1 = null;
|
|
int pStrSize1 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize1 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize1 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr1 = Utils.Alloc<byte>(pStrSize1 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack1 = stackalloc byte[pStrSize1 + 1];
|
|
pStr1 = pStrStack1;
|
|
}
|
|
int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1);
|
|
pStr1[pStrOffset1] = 0;
|
|
}
|
|
CalcTextSizeANative(pOut, (ImFont*)pself, size, maxWidth, wrapWidth, pStr0, pStr1, remaining);
|
|
if (pStrSize1 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr1);
|
|
}
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(Vector2* pOut, ref ImFont self, float size, float maxWidth, float wrapWidth, string textBegin, string textEnd)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textBegin != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textBegin);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textBegin, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
byte* pStr1 = null;
|
|
int pStrSize1 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize1 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize1 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr1 = Utils.Alloc<byte>(pStrSize1 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack1 = stackalloc byte[pStrSize1 + 1];
|
|
pStr1 = pStrStack1;
|
|
}
|
|
int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1);
|
|
pStr1[pStrOffset1] = 0;
|
|
}
|
|
CalcTextSizeANative(pOut, (ImFont*)pself, size, maxWidth, wrapWidth, pStr0, pStr1, (byte**)(default));
|
|
if (pStrSize1 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr1);
|
|
}
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(Vector2* pOut, ref ImFont self, float size, float maxWidth, float wrapWidth, ref byte textBegin, ReadOnlySpan<byte> textEnd, byte** remaining)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
fixed (byte* ptextBegin = &textBegin)
|
|
{
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
CalcTextSizeANative(pOut, (ImFont*)pself, size, maxWidth, wrapWidth, (byte*)ptextBegin, (byte*)ptextEnd, remaining);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(Vector2* pOut, ref ImFont self, float size, float maxWidth, float wrapWidth, ref byte textBegin, ReadOnlySpan<byte> textEnd)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
fixed (byte* ptextBegin = &textBegin)
|
|
{
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
CalcTextSizeANative(pOut, (ImFont*)pself, size, maxWidth, wrapWidth, (byte*)ptextBegin, (byte*)ptextEnd, (byte**)(default));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(Vector2* pOut, ref ImFont self, float size, float maxWidth, float wrapWidth, ref byte textBegin, string textEnd, byte** remaining)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
fixed (byte* ptextBegin = &textBegin)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
CalcTextSizeANative(pOut, (ImFont*)pself, size, maxWidth, wrapWidth, (byte*)ptextBegin, pStr0, remaining);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(Vector2* pOut, ref ImFont self, float size, float maxWidth, float wrapWidth, ref byte textBegin, string textEnd)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
fixed (byte* ptextBegin = &textBegin)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
CalcTextSizeANative(pOut, (ImFont*)pself, size, maxWidth, wrapWidth, (byte*)ptextBegin, pStr0, (byte**)(default));
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(Vector2* pOut, ref ImFont self, float size, float maxWidth, float wrapWidth, ReadOnlySpan<byte> textBegin, ref byte textEnd, byte** remaining)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
fixed (byte* ptextBegin = textBegin)
|
|
{
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
CalcTextSizeANative(pOut, (ImFont*)pself, size, maxWidth, wrapWidth, (byte*)ptextBegin, (byte*)ptextEnd, remaining);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(Vector2* pOut, ref ImFont self, float size, float maxWidth, float wrapWidth, ReadOnlySpan<byte> textBegin, ref byte textEnd)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
fixed (byte* ptextBegin = textBegin)
|
|
{
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
CalcTextSizeANative(pOut, (ImFont*)pself, size, maxWidth, wrapWidth, (byte*)ptextBegin, (byte*)ptextEnd, (byte**)(default));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(Vector2* pOut, ref ImFont self, float size, float maxWidth, float wrapWidth, ReadOnlySpan<byte> textBegin, string textEnd, byte** remaining)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
fixed (byte* ptextBegin = textBegin)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
CalcTextSizeANative(pOut, (ImFont*)pself, size, maxWidth, wrapWidth, (byte*)ptextBegin, pStr0, remaining);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(Vector2* pOut, ref ImFont self, float size, float maxWidth, float wrapWidth, ReadOnlySpan<byte> textBegin, string textEnd)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
fixed (byte* ptextBegin = textBegin)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
CalcTextSizeANative(pOut, (ImFont*)pself, size, maxWidth, wrapWidth, (byte*)ptextBegin, pStr0, (byte**)(default));
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(Vector2* pOut, ref ImFont self, float size, float maxWidth, float wrapWidth, string textBegin, ref byte textEnd, byte** remaining)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textBegin != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textBegin);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textBegin, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
CalcTextSizeANative(pOut, (ImFont*)pself, size, maxWidth, wrapWidth, pStr0, (byte*)ptextEnd, remaining);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(Vector2* pOut, ref ImFont self, float size, float maxWidth, float wrapWidth, string textBegin, ref byte textEnd)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textBegin != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textBegin);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textBegin, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
CalcTextSizeANative(pOut, (ImFont*)pself, size, maxWidth, wrapWidth, pStr0, (byte*)ptextEnd, (byte**)(default));
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(Vector2* pOut, ref ImFont self, float size, float maxWidth, float wrapWidth, string textBegin, ReadOnlySpan<byte> textEnd, byte** remaining)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textBegin != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textBegin);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textBegin, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
CalcTextSizeANative(pOut, (ImFont*)pself, size, maxWidth, wrapWidth, pStr0, (byte*)ptextEnd, remaining);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(Vector2* pOut, ref ImFont self, float size, float maxWidth, float wrapWidth, string textBegin, ReadOnlySpan<byte> textEnd)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textBegin != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textBegin);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textBegin, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
CalcTextSizeANative(pOut, (ImFont*)pself, size, maxWidth, wrapWidth, pStr0, (byte*)ptextEnd, (byte**)(default));
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static Vector2 CalcTextSizeA(ImFontPtr self, float size, float maxWidth, float wrapWidth, byte* textBegin, ref byte* remaining)
|
|
{
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
Vector2 ret;
|
|
CalcTextSizeANative(&ret, self, size, maxWidth, wrapWidth, textBegin, (byte*)(default), (byte**)premaining);
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static Vector2 CalcTextSizeA(ImFontPtr self, float size, float maxWidth, float wrapWidth, byte* textBegin, byte* textEnd, ref byte* remaining)
|
|
{
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
Vector2 ret;
|
|
CalcTextSizeANative(&ret, self, size, maxWidth, wrapWidth, textBegin, textEnd, (byte**)premaining);
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(Vector2* pOut, ImFontPtr self, float size, float maxWidth, float wrapWidth, byte* textBegin, byte* textEnd, ref byte* remaining)
|
|
{
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
CalcTextSizeANative(pOut, self, size, maxWidth, wrapWidth, textBegin, textEnd, (byte**)premaining);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(Vector2* pOut, ImFontPtr self, float size, float maxWidth, float wrapWidth, byte* textBegin, ref byte* remaining)
|
|
{
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
CalcTextSizeANative(pOut, self, size, maxWidth, wrapWidth, textBegin, (byte*)(default), (byte**)premaining);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(ref Vector2 pOut, ImFontPtr self, float size, float maxWidth, float wrapWidth, byte* textBegin, byte* textEnd, ref byte* remaining)
|
|
{
|
|
fixed (Vector2* ppOut = &pOut)
|
|
{
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
CalcTextSizeANative((Vector2*)ppOut, self, size, maxWidth, wrapWidth, textBegin, textEnd, (byte**)premaining);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(ref Vector2 pOut, ImFontPtr self, float size, float maxWidth, float wrapWidth, byte* textBegin, ref byte* remaining)
|
|
{
|
|
fixed (Vector2* ppOut = &pOut)
|
|
{
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
CalcTextSizeANative((Vector2*)ppOut, self, size, maxWidth, wrapWidth, textBegin, (byte*)(default), (byte**)premaining);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static Vector2 CalcTextSizeA(ref ImFont self, float size, float maxWidth, float wrapWidth, byte* textBegin, ref byte* remaining)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
Vector2 ret;
|
|
CalcTextSizeANative(&ret, (ImFont*)pself, size, maxWidth, wrapWidth, textBegin, (byte*)(default), (byte**)premaining);
|
|
return ret;
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static Vector2 CalcTextSizeA(ref ImFont self, float size, float maxWidth, float wrapWidth, byte* textBegin, byte* textEnd, ref byte* remaining)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
Vector2 ret;
|
|
CalcTextSizeANative(&ret, (ImFont*)pself, size, maxWidth, wrapWidth, textBegin, textEnd, (byte**)premaining);
|
|
return ret;
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(Vector2* pOut, ref ImFont self, float size, float maxWidth, float wrapWidth, byte* textBegin, byte* textEnd, ref byte* remaining)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
CalcTextSizeANative(pOut, (ImFont*)pself, size, maxWidth, wrapWidth, textBegin, textEnd, (byte**)premaining);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(Vector2* pOut, ref ImFont self, float size, float maxWidth, float wrapWidth, byte* textBegin, ref byte* remaining)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
CalcTextSizeANative(pOut, (ImFont*)pself, size, maxWidth, wrapWidth, textBegin, (byte*)(default), (byte**)premaining);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(ref Vector2 pOut, ref ImFont self, float size, float maxWidth, float wrapWidth, byte* textBegin, byte* textEnd, ref byte* remaining)
|
|
{
|
|
fixed (Vector2* ppOut = &pOut)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
CalcTextSizeANative((Vector2*)ppOut, (ImFont*)pself, size, maxWidth, wrapWidth, textBegin, textEnd, (byte**)premaining);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(ref Vector2 pOut, ref ImFont self, float size, float maxWidth, float wrapWidth, byte* textBegin, ref byte* remaining)
|
|
{
|
|
fixed (Vector2* ppOut = &pOut)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
CalcTextSizeANative((Vector2*)ppOut, (ImFont*)pself, size, maxWidth, wrapWidth, textBegin, (byte*)(default), (byte**)premaining);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static Vector2 CalcTextSizeA(ImFontPtr self, float size, float maxWidth, float wrapWidth, ref byte textBegin, ref byte* remaining)
|
|
{
|
|
fixed (byte* ptextBegin = &textBegin)
|
|
{
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
Vector2 ret;
|
|
CalcTextSizeANative(&ret, self, size, maxWidth, wrapWidth, (byte*)ptextBegin, (byte*)(default), (byte**)premaining);
|
|
return ret;
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static Vector2 CalcTextSizeA(ImFontPtr self, float size, float maxWidth, float wrapWidth, ref byte textBegin, byte* textEnd, ref byte* remaining)
|
|
{
|
|
fixed (byte* ptextBegin = &textBegin)
|
|
{
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
Vector2 ret;
|
|
CalcTextSizeANative(&ret, self, size, maxWidth, wrapWidth, (byte*)ptextBegin, textEnd, (byte**)premaining);
|
|
return ret;
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static Vector2 CalcTextSizeA(ImFontPtr self, float size, float maxWidth, float wrapWidth, ReadOnlySpan<byte> textBegin, ref byte* remaining)
|
|
{
|
|
fixed (byte* ptextBegin = textBegin)
|
|
{
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
Vector2 ret;
|
|
CalcTextSizeANative(&ret, self, size, maxWidth, wrapWidth, (byte*)ptextBegin, (byte*)(default), (byte**)premaining);
|
|
return ret;
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static Vector2 CalcTextSizeA(ImFontPtr self, float size, float maxWidth, float wrapWidth, ReadOnlySpan<byte> textBegin, byte* textEnd, ref byte* remaining)
|
|
{
|
|
fixed (byte* ptextBegin = textBegin)
|
|
{
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
Vector2 ret;
|
|
CalcTextSizeANative(&ret, self, size, maxWidth, wrapWidth, (byte*)ptextBegin, textEnd, (byte**)premaining);
|
|
return ret;
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static Vector2 CalcTextSizeA(ImFontPtr self, float size, float maxWidth, float wrapWidth, string textBegin, ref byte* remaining)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textBegin != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textBegin);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textBegin, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
Vector2 ret;
|
|
CalcTextSizeANative(&ret, self, size, maxWidth, wrapWidth, pStr0, (byte*)(default), (byte**)premaining);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static Vector2 CalcTextSizeA(ImFontPtr self, float size, float maxWidth, float wrapWidth, string textBegin, byte* textEnd, ref byte* remaining)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textBegin != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textBegin);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textBegin, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
Vector2 ret;
|
|
CalcTextSizeANative(&ret, self, size, maxWidth, wrapWidth, pStr0, textEnd, (byte**)premaining);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(ref Vector2 pOut, ImFontPtr self, float size, float maxWidth, float wrapWidth, ref byte textBegin, byte* textEnd, ref byte* remaining)
|
|
{
|
|
fixed (Vector2* ppOut = &pOut)
|
|
{
|
|
fixed (byte* ptextBegin = &textBegin)
|
|
{
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
CalcTextSizeANative((Vector2*)ppOut, self, size, maxWidth, wrapWidth, (byte*)ptextBegin, textEnd, (byte**)premaining);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(ref Vector2 pOut, ImFontPtr self, float size, float maxWidth, float wrapWidth, ref byte textBegin, ref byte* remaining)
|
|
{
|
|
fixed (Vector2* ppOut = &pOut)
|
|
{
|
|
fixed (byte* ptextBegin = &textBegin)
|
|
{
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
CalcTextSizeANative((Vector2*)ppOut, self, size, maxWidth, wrapWidth, (byte*)ptextBegin, (byte*)(default), (byte**)premaining);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(ref Vector2 pOut, ImFontPtr self, float size, float maxWidth, float wrapWidth, ReadOnlySpan<byte> textBegin, byte* textEnd, ref byte* remaining)
|
|
{
|
|
fixed (Vector2* ppOut = &pOut)
|
|
{
|
|
fixed (byte* ptextBegin = textBegin)
|
|
{
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
CalcTextSizeANative((Vector2*)ppOut, self, size, maxWidth, wrapWidth, (byte*)ptextBegin, textEnd, (byte**)premaining);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(ref Vector2 pOut, ImFontPtr self, float size, float maxWidth, float wrapWidth, ReadOnlySpan<byte> textBegin, ref byte* remaining)
|
|
{
|
|
fixed (Vector2* ppOut = &pOut)
|
|
{
|
|
fixed (byte* ptextBegin = textBegin)
|
|
{
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
CalcTextSizeANative((Vector2*)ppOut, self, size, maxWidth, wrapWidth, (byte*)ptextBegin, (byte*)(default), (byte**)premaining);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(ref Vector2 pOut, ImFontPtr self, float size, float maxWidth, float wrapWidth, string textBegin, byte* textEnd, ref byte* remaining)
|
|
{
|
|
fixed (Vector2* ppOut = &pOut)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textBegin != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textBegin);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textBegin, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
CalcTextSizeANative((Vector2*)ppOut, self, size, maxWidth, wrapWidth, pStr0, textEnd, (byte**)premaining);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(ref Vector2 pOut, ImFontPtr self, float size, float maxWidth, float wrapWidth, string textBegin, ref byte* remaining)
|
|
{
|
|
fixed (Vector2* ppOut = &pOut)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textBegin != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textBegin);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textBegin, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
CalcTextSizeANative((Vector2*)ppOut, self, size, maxWidth, wrapWidth, pStr0, (byte*)(default), (byte**)premaining);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static Vector2 CalcTextSizeA(ref ImFont self, float size, float maxWidth, float wrapWidth, ref byte textBegin, ref byte* remaining)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
fixed (byte* ptextBegin = &textBegin)
|
|
{
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
Vector2 ret;
|
|
CalcTextSizeANative(&ret, (ImFont*)pself, size, maxWidth, wrapWidth, (byte*)ptextBegin, (byte*)(default), (byte**)premaining);
|
|
return ret;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static Vector2 CalcTextSizeA(ref ImFont self, float size, float maxWidth, float wrapWidth, ref byte textBegin, byte* textEnd, ref byte* remaining)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
fixed (byte* ptextBegin = &textBegin)
|
|
{
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
Vector2 ret;
|
|
CalcTextSizeANative(&ret, (ImFont*)pself, size, maxWidth, wrapWidth, (byte*)ptextBegin, textEnd, (byte**)premaining);
|
|
return ret;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static Vector2 CalcTextSizeA(ref ImFont self, float size, float maxWidth, float wrapWidth, ReadOnlySpan<byte> textBegin, ref byte* remaining)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
fixed (byte* ptextBegin = textBegin)
|
|
{
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
Vector2 ret;
|
|
CalcTextSizeANative(&ret, (ImFont*)pself, size, maxWidth, wrapWidth, (byte*)ptextBegin, (byte*)(default), (byte**)premaining);
|
|
return ret;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static Vector2 CalcTextSizeA(ref ImFont self, float size, float maxWidth, float wrapWidth, ReadOnlySpan<byte> textBegin, byte* textEnd, ref byte* remaining)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
fixed (byte* ptextBegin = textBegin)
|
|
{
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
Vector2 ret;
|
|
CalcTextSizeANative(&ret, (ImFont*)pself, size, maxWidth, wrapWidth, (byte*)ptextBegin, textEnd, (byte**)premaining);
|
|
return ret;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static Vector2 CalcTextSizeA(ref ImFont self, float size, float maxWidth, float wrapWidth, string textBegin, ref byte* remaining)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textBegin != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textBegin);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textBegin, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
Vector2 ret;
|
|
CalcTextSizeANative(&ret, (ImFont*)pself, size, maxWidth, wrapWidth, pStr0, (byte*)(default), (byte**)premaining);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
return ret;
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static Vector2 CalcTextSizeA(ref ImFont self, float size, float maxWidth, float wrapWidth, string textBegin, byte* textEnd, ref byte* remaining)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textBegin != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textBegin);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textBegin, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
Vector2 ret;
|
|
CalcTextSizeANative(&ret, (ImFont*)pself, size, maxWidth, wrapWidth, pStr0, textEnd, (byte**)premaining);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
return ret;
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(ref Vector2 pOut, ref ImFont self, float size, float maxWidth, float wrapWidth, ref byte textBegin, byte* textEnd, ref byte* remaining)
|
|
{
|
|
fixed (Vector2* ppOut = &pOut)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
fixed (byte* ptextBegin = &textBegin)
|
|
{
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
CalcTextSizeANative((Vector2*)ppOut, (ImFont*)pself, size, maxWidth, wrapWidth, (byte*)ptextBegin, textEnd, (byte**)premaining);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(ref Vector2 pOut, ref ImFont self, float size, float maxWidth, float wrapWidth, ref byte textBegin, ref byte* remaining)
|
|
{
|
|
fixed (Vector2* ppOut = &pOut)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
fixed (byte* ptextBegin = &textBegin)
|
|
{
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
CalcTextSizeANative((Vector2*)ppOut, (ImFont*)pself, size, maxWidth, wrapWidth, (byte*)ptextBegin, (byte*)(default), (byte**)premaining);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(ref Vector2 pOut, ref ImFont self, float size, float maxWidth, float wrapWidth, ReadOnlySpan<byte> textBegin, byte* textEnd, ref byte* remaining)
|
|
{
|
|
fixed (Vector2* ppOut = &pOut)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
fixed (byte* ptextBegin = textBegin)
|
|
{
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
CalcTextSizeANative((Vector2*)ppOut, (ImFont*)pself, size, maxWidth, wrapWidth, (byte*)ptextBegin, textEnd, (byte**)premaining);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(ref Vector2 pOut, ref ImFont self, float size, float maxWidth, float wrapWidth, ReadOnlySpan<byte> textBegin, ref byte* remaining)
|
|
{
|
|
fixed (Vector2* ppOut = &pOut)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
fixed (byte* ptextBegin = textBegin)
|
|
{
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
CalcTextSizeANative((Vector2*)ppOut, (ImFont*)pself, size, maxWidth, wrapWidth, (byte*)ptextBegin, (byte*)(default), (byte**)premaining);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(ref Vector2 pOut, ref ImFont self, float size, float maxWidth, float wrapWidth, string textBegin, byte* textEnd, ref byte* remaining)
|
|
{
|
|
fixed (Vector2* ppOut = &pOut)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textBegin != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textBegin);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textBegin, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
CalcTextSizeANative((Vector2*)ppOut, (ImFont*)pself, size, maxWidth, wrapWidth, pStr0, textEnd, (byte**)premaining);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(ref Vector2 pOut, ref ImFont self, float size, float maxWidth, float wrapWidth, string textBegin, ref byte* remaining)
|
|
{
|
|
fixed (Vector2* ppOut = &pOut)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textBegin != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textBegin);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textBegin, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
CalcTextSizeANative((Vector2*)ppOut, (ImFont*)pself, size, maxWidth, wrapWidth, pStr0, (byte*)(default), (byte**)premaining);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(Vector2* pOut, ImFontPtr self, float size, float maxWidth, float wrapWidth, ref byte textBegin, byte* textEnd, ref byte* remaining)
|
|
{
|
|
fixed (byte* ptextBegin = &textBegin)
|
|
{
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
CalcTextSizeANative(pOut, self, size, maxWidth, wrapWidth, (byte*)ptextBegin, textEnd, (byte**)premaining);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(Vector2* pOut, ImFontPtr self, float size, float maxWidth, float wrapWidth, ref byte textBegin, ref byte* remaining)
|
|
{
|
|
fixed (byte* ptextBegin = &textBegin)
|
|
{
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
CalcTextSizeANative(pOut, self, size, maxWidth, wrapWidth, (byte*)ptextBegin, (byte*)(default), (byte**)premaining);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(Vector2* pOut, ImFontPtr self, float size, float maxWidth, float wrapWidth, ReadOnlySpan<byte> textBegin, byte* textEnd, ref byte* remaining)
|
|
{
|
|
fixed (byte* ptextBegin = textBegin)
|
|
{
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
CalcTextSizeANative(pOut, self, size, maxWidth, wrapWidth, (byte*)ptextBegin, textEnd, (byte**)premaining);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(Vector2* pOut, ImFontPtr self, float size, float maxWidth, float wrapWidth, ReadOnlySpan<byte> textBegin, ref byte* remaining)
|
|
{
|
|
fixed (byte* ptextBegin = textBegin)
|
|
{
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
CalcTextSizeANative(pOut, self, size, maxWidth, wrapWidth, (byte*)ptextBegin, (byte*)(default), (byte**)premaining);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(Vector2* pOut, ImFontPtr self, float size, float maxWidth, float wrapWidth, string textBegin, byte* textEnd, ref byte* remaining)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textBegin != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textBegin);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textBegin, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
CalcTextSizeANative(pOut, self, size, maxWidth, wrapWidth, pStr0, textEnd, (byte**)premaining);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(Vector2* pOut, ImFontPtr self, float size, float maxWidth, float wrapWidth, string textBegin, ref byte* remaining)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textBegin != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textBegin);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textBegin, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
CalcTextSizeANative(pOut, self, size, maxWidth, wrapWidth, pStr0, (byte*)(default), (byte**)premaining);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(Vector2* pOut, ref ImFont self, float size, float maxWidth, float wrapWidth, ref byte textBegin, byte* textEnd, ref byte* remaining)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
fixed (byte* ptextBegin = &textBegin)
|
|
{
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
CalcTextSizeANative(pOut, (ImFont*)pself, size, maxWidth, wrapWidth, (byte*)ptextBegin, textEnd, (byte**)premaining);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(Vector2* pOut, ref ImFont self, float size, float maxWidth, float wrapWidth, ref byte textBegin, ref byte* remaining)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
fixed (byte* ptextBegin = &textBegin)
|
|
{
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
CalcTextSizeANative(pOut, (ImFont*)pself, size, maxWidth, wrapWidth, (byte*)ptextBegin, (byte*)(default), (byte**)premaining);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(Vector2* pOut, ref ImFont self, float size, float maxWidth, float wrapWidth, ReadOnlySpan<byte> textBegin, byte* textEnd, ref byte* remaining)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
fixed (byte* ptextBegin = textBegin)
|
|
{
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
CalcTextSizeANative(pOut, (ImFont*)pself, size, maxWidth, wrapWidth, (byte*)ptextBegin, textEnd, (byte**)premaining);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(Vector2* pOut, ref ImFont self, float size, float maxWidth, float wrapWidth, ReadOnlySpan<byte> textBegin, ref byte* remaining)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
fixed (byte* ptextBegin = textBegin)
|
|
{
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
CalcTextSizeANative(pOut, (ImFont*)pself, size, maxWidth, wrapWidth, (byte*)ptextBegin, (byte*)(default), (byte**)premaining);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(Vector2* pOut, ref ImFont self, float size, float maxWidth, float wrapWidth, string textBegin, byte* textEnd, ref byte* remaining)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textBegin != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textBegin);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textBegin, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
CalcTextSizeANative(pOut, (ImFont*)pself, size, maxWidth, wrapWidth, pStr0, textEnd, (byte**)premaining);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(Vector2* pOut, ref ImFont self, float size, float maxWidth, float wrapWidth, string textBegin, ref byte* remaining)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textBegin != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textBegin);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textBegin, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
CalcTextSizeANative(pOut, (ImFont*)pself, size, maxWidth, wrapWidth, pStr0, (byte*)(default), (byte**)premaining);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static Vector2 CalcTextSizeA(ImFontPtr self, float size, float maxWidth, float wrapWidth, byte* textBegin, ref byte textEnd, ref byte* remaining)
|
|
{
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
Vector2 ret;
|
|
CalcTextSizeANative(&ret, self, size, maxWidth, wrapWidth, textBegin, (byte*)ptextEnd, (byte**)premaining);
|
|
return ret;
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static Vector2 CalcTextSizeA(ImFontPtr self, float size, float maxWidth, float wrapWidth, byte* textBegin, ReadOnlySpan<byte> textEnd, ref byte* remaining)
|
|
{
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
Vector2 ret;
|
|
CalcTextSizeANative(&ret, self, size, maxWidth, wrapWidth, textBegin, (byte*)ptextEnd, (byte**)premaining);
|
|
return ret;
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static Vector2 CalcTextSizeA(ImFontPtr self, float size, float maxWidth, float wrapWidth, byte* textBegin, string textEnd, ref byte* remaining)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
Vector2 ret;
|
|
CalcTextSizeANative(&ret, self, size, maxWidth, wrapWidth, textBegin, pStr0, (byte**)premaining);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(ref Vector2 pOut, ImFontPtr self, float size, float maxWidth, float wrapWidth, byte* textBegin, ref byte textEnd, ref byte* remaining)
|
|
{
|
|
fixed (Vector2* ppOut = &pOut)
|
|
{
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
CalcTextSizeANative((Vector2*)ppOut, self, size, maxWidth, wrapWidth, textBegin, (byte*)ptextEnd, (byte**)premaining);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(ref Vector2 pOut, ImFontPtr self, float size, float maxWidth, float wrapWidth, byte* textBegin, ReadOnlySpan<byte> textEnd, ref byte* remaining)
|
|
{
|
|
fixed (Vector2* ppOut = &pOut)
|
|
{
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
CalcTextSizeANative((Vector2*)ppOut, self, size, maxWidth, wrapWidth, textBegin, (byte*)ptextEnd, (byte**)premaining);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(ref Vector2 pOut, ImFontPtr self, float size, float maxWidth, float wrapWidth, byte* textBegin, string textEnd, ref byte* remaining)
|
|
{
|
|
fixed (Vector2* ppOut = &pOut)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
CalcTextSizeANative((Vector2*)ppOut, self, size, maxWidth, wrapWidth, textBegin, pStr0, (byte**)premaining);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static Vector2 CalcTextSizeA(ref ImFont self, float size, float maxWidth, float wrapWidth, byte* textBegin, ref byte textEnd, ref byte* remaining)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
Vector2 ret;
|
|
CalcTextSizeANative(&ret, (ImFont*)pself, size, maxWidth, wrapWidth, textBegin, (byte*)ptextEnd, (byte**)premaining);
|
|
return ret;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static Vector2 CalcTextSizeA(ref ImFont self, float size, float maxWidth, float wrapWidth, byte* textBegin, ReadOnlySpan<byte> textEnd, ref byte* remaining)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
Vector2 ret;
|
|
CalcTextSizeANative(&ret, (ImFont*)pself, size, maxWidth, wrapWidth, textBegin, (byte*)ptextEnd, (byte**)premaining);
|
|
return ret;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static Vector2 CalcTextSizeA(ref ImFont self, float size, float maxWidth, float wrapWidth, byte* textBegin, string textEnd, ref byte* remaining)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
Vector2 ret;
|
|
CalcTextSizeANative(&ret, (ImFont*)pself, size, maxWidth, wrapWidth, textBegin, pStr0, (byte**)premaining);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
return ret;
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(ref Vector2 pOut, ref ImFont self, float size, float maxWidth, float wrapWidth, byte* textBegin, ref byte textEnd, ref byte* remaining)
|
|
{
|
|
fixed (Vector2* ppOut = &pOut)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
CalcTextSizeANative((Vector2*)ppOut, (ImFont*)pself, size, maxWidth, wrapWidth, textBegin, (byte*)ptextEnd, (byte**)premaining);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(ref Vector2 pOut, ref ImFont self, float size, float maxWidth, float wrapWidth, byte* textBegin, ReadOnlySpan<byte> textEnd, ref byte* remaining)
|
|
{
|
|
fixed (Vector2* ppOut = &pOut)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
CalcTextSizeANative((Vector2*)ppOut, (ImFont*)pself, size, maxWidth, wrapWidth, textBegin, (byte*)ptextEnd, (byte**)premaining);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(ref Vector2 pOut, ref ImFont self, float size, float maxWidth, float wrapWidth, byte* textBegin, string textEnd, ref byte* remaining)
|
|
{
|
|
fixed (Vector2* ppOut = &pOut)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
CalcTextSizeANative((Vector2*)ppOut, (ImFont*)pself, size, maxWidth, wrapWidth, textBegin, pStr0, (byte**)premaining);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(Vector2* pOut, ImFontPtr self, float size, float maxWidth, float wrapWidth, byte* textBegin, ref byte textEnd, ref byte* remaining)
|
|
{
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
CalcTextSizeANative(pOut, self, size, maxWidth, wrapWidth, textBegin, (byte*)ptextEnd, (byte**)premaining);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(Vector2* pOut, ImFontPtr self, float size, float maxWidth, float wrapWidth, byte* textBegin, ReadOnlySpan<byte> textEnd, ref byte* remaining)
|
|
{
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
CalcTextSizeANative(pOut, self, size, maxWidth, wrapWidth, textBegin, (byte*)ptextEnd, (byte**)premaining);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(Vector2* pOut, ImFontPtr self, float size, float maxWidth, float wrapWidth, byte* textBegin, string textEnd, ref byte* remaining)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
CalcTextSizeANative(pOut, self, size, maxWidth, wrapWidth, textBegin, pStr0, (byte**)premaining);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(Vector2* pOut, ref ImFont self, float size, float maxWidth, float wrapWidth, byte* textBegin, ref byte textEnd, ref byte* remaining)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
CalcTextSizeANative(pOut, (ImFont*)pself, size, maxWidth, wrapWidth, textBegin, (byte*)ptextEnd, (byte**)premaining);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(Vector2* pOut, ref ImFont self, float size, float maxWidth, float wrapWidth, byte* textBegin, ReadOnlySpan<byte> textEnd, ref byte* remaining)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
CalcTextSizeANative(pOut, (ImFont*)pself, size, maxWidth, wrapWidth, textBegin, (byte*)ptextEnd, (byte**)premaining);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(Vector2* pOut, ref ImFont self, float size, float maxWidth, float wrapWidth, byte* textBegin, string textEnd, ref byte* remaining)
|
|
{
|
|
fixed (ImFont* pself = &self)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
CalcTextSizeANative(pOut, (ImFont*)pself, size, maxWidth, wrapWidth, textBegin, pStr0, (byte**)premaining);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static Vector2 CalcTextSizeA(ImFontPtr self, float size, float maxWidth, float wrapWidth, ref byte textBegin, ref byte textEnd, ref byte* remaining)
|
|
{
|
|
fixed (byte* ptextBegin = &textBegin)
|
|
{
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
Vector2 ret;
|
|
CalcTextSizeANative(&ret, self, size, maxWidth, wrapWidth, (byte*)ptextBegin, (byte*)ptextEnd, (byte**)premaining);
|
|
return ret;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static Vector2 CalcTextSizeA(ImFontPtr self, float size, float maxWidth, float wrapWidth, ReadOnlySpan<byte> textBegin, ReadOnlySpan<byte> textEnd, ref byte* remaining)
|
|
{
|
|
fixed (byte* ptextBegin = textBegin)
|
|
{
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
Vector2 ret;
|
|
CalcTextSizeANative(&ret, self, size, maxWidth, wrapWidth, (byte*)ptextBegin, (byte*)ptextEnd, (byte**)premaining);
|
|
return ret;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static Vector2 CalcTextSizeA(ImFontPtr self, float size, float maxWidth, float wrapWidth, string textBegin, string textEnd, ref byte* remaining)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textBegin != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textBegin);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textBegin, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
byte* pStr1 = null;
|
|
int pStrSize1 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize1 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize1 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr1 = Utils.Alloc<byte>(pStrSize1 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack1 = stackalloc byte[pStrSize1 + 1];
|
|
pStr1 = pStrStack1;
|
|
}
|
|
int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1);
|
|
pStr1[pStrOffset1] = 0;
|
|
}
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
Vector2 ret;
|
|
CalcTextSizeANative(&ret, self, size, maxWidth, wrapWidth, pStr0, pStr1, (byte**)premaining);
|
|
if (pStrSize1 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr1);
|
|
}
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static Vector2 CalcTextSizeA(ImFontPtr self, float size, float maxWidth, float wrapWidth, ref byte textBegin, ReadOnlySpan<byte> textEnd, ref byte* remaining)
|
|
{
|
|
fixed (byte* ptextBegin = &textBegin)
|
|
{
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
Vector2 ret;
|
|
CalcTextSizeANative(&ret, self, size, maxWidth, wrapWidth, (byte*)ptextBegin, (byte*)ptextEnd, (byte**)premaining);
|
|
return ret;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static Vector2 CalcTextSizeA(ImFontPtr self, float size, float maxWidth, float wrapWidth, ref byte textBegin, string textEnd, ref byte* remaining)
|
|
{
|
|
fixed (byte* ptextBegin = &textBegin)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
Vector2 ret;
|
|
CalcTextSizeANative(&ret, self, size, maxWidth, wrapWidth, (byte*)ptextBegin, pStr0, (byte**)premaining);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
return ret;
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static Vector2 CalcTextSizeA(ImFontPtr self, float size, float maxWidth, float wrapWidth, ReadOnlySpan<byte> textBegin, ref byte textEnd, ref byte* remaining)
|
|
{
|
|
fixed (byte* ptextBegin = textBegin)
|
|
{
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
Vector2 ret;
|
|
CalcTextSizeANative(&ret, self, size, maxWidth, wrapWidth, (byte*)ptextBegin, (byte*)ptextEnd, (byte**)premaining);
|
|
return ret;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static Vector2 CalcTextSizeA(ImFontPtr self, float size, float maxWidth, float wrapWidth, ReadOnlySpan<byte> textBegin, string textEnd, ref byte* remaining)
|
|
{
|
|
fixed (byte* ptextBegin = textBegin)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
Vector2 ret;
|
|
CalcTextSizeANative(&ret, self, size, maxWidth, wrapWidth, (byte*)ptextBegin, pStr0, (byte**)premaining);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
return ret;
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static Vector2 CalcTextSizeA(ImFontPtr self, float size, float maxWidth, float wrapWidth, string textBegin, ref byte textEnd, ref byte* remaining)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textBegin != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textBegin);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textBegin, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
Vector2 ret;
|
|
CalcTextSizeANative(&ret, self, size, maxWidth, wrapWidth, pStr0, (byte*)ptextEnd, (byte**)premaining);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
return ret;
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static Vector2 CalcTextSizeA(ImFontPtr self, float size, float maxWidth, float wrapWidth, string textBegin, ReadOnlySpan<byte> textEnd, ref byte* remaining)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textBegin != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textBegin);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textBegin, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
Vector2 ret;
|
|
CalcTextSizeANative(&ret, self, size, maxWidth, wrapWidth, pStr0, (byte*)ptextEnd, (byte**)premaining);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
return ret;
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(ref Vector2 pOut, ImFontPtr self, float size, float maxWidth, float wrapWidth, ref byte textBegin, ref byte textEnd, ref byte* remaining)
|
|
{
|
|
fixed (Vector2* ppOut = &pOut)
|
|
{
|
|
fixed (byte* ptextBegin = &textBegin)
|
|
{
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
CalcTextSizeANative((Vector2*)ppOut, self, size, maxWidth, wrapWidth, (byte*)ptextBegin, (byte*)ptextEnd, (byte**)premaining);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(ref Vector2 pOut, ImFontPtr self, float size, float maxWidth, float wrapWidth, ReadOnlySpan<byte> textBegin, ReadOnlySpan<byte> textEnd, ref byte* remaining)
|
|
{
|
|
fixed (Vector2* ppOut = &pOut)
|
|
{
|
|
fixed (byte* ptextBegin = textBegin)
|
|
{
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
CalcTextSizeANative((Vector2*)ppOut, self, size, maxWidth, wrapWidth, (byte*)ptextBegin, (byte*)ptextEnd, (byte**)premaining);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(ref Vector2 pOut, ImFontPtr self, float size, float maxWidth, float wrapWidth, string textBegin, string textEnd, ref byte* remaining)
|
|
{
|
|
fixed (Vector2* ppOut = &pOut)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textBegin != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textBegin);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textBegin, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
byte* pStr1 = null;
|
|
int pStrSize1 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize1 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize1 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr1 = Utils.Alloc<byte>(pStrSize1 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack1 = stackalloc byte[pStrSize1 + 1];
|
|
pStr1 = pStrStack1;
|
|
}
|
|
int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1);
|
|
pStr1[pStrOffset1] = 0;
|
|
}
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
CalcTextSizeANative((Vector2*)ppOut, self, size, maxWidth, wrapWidth, pStr0, pStr1, (byte**)premaining);
|
|
if (pStrSize1 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr1);
|
|
}
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(ref Vector2 pOut, ImFontPtr self, float size, float maxWidth, float wrapWidth, ref byte textBegin, ReadOnlySpan<byte> textEnd, ref byte* remaining)
|
|
{
|
|
fixed (Vector2* ppOut = &pOut)
|
|
{
|
|
fixed (byte* ptextBegin = &textBegin)
|
|
{
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
CalcTextSizeANative((Vector2*)ppOut, self, size, maxWidth, wrapWidth, (byte*)ptextBegin, (byte*)ptextEnd, (byte**)premaining);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(ref Vector2 pOut, ImFontPtr self, float size, float maxWidth, float wrapWidth, ref byte textBegin, string textEnd, ref byte* remaining)
|
|
{
|
|
fixed (Vector2* ppOut = &pOut)
|
|
{
|
|
fixed (byte* ptextBegin = &textBegin)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
CalcTextSizeANative((Vector2*)ppOut, self, size, maxWidth, wrapWidth, (byte*)ptextBegin, pStr0, (byte**)premaining);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(ref Vector2 pOut, ImFontPtr self, float size, float maxWidth, float wrapWidth, ReadOnlySpan<byte> textBegin, ref byte textEnd, ref byte* remaining)
|
|
{
|
|
fixed (Vector2* ppOut = &pOut)
|
|
{
|
|
fixed (byte* ptextBegin = textBegin)
|
|
{
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
CalcTextSizeANative((Vector2*)ppOut, self, size, maxWidth, wrapWidth, (byte*)ptextBegin, (byte*)ptextEnd, (byte**)premaining);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(ref Vector2 pOut, ImFontPtr self, float size, float maxWidth, float wrapWidth, ReadOnlySpan<byte> textBegin, string textEnd, ref byte* remaining)
|
|
{
|
|
fixed (Vector2* ppOut = &pOut)
|
|
{
|
|
fixed (byte* ptextBegin = textBegin)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
CalcTextSizeANative((Vector2*)ppOut, self, size, maxWidth, wrapWidth, (byte*)ptextBegin, pStr0, (byte**)premaining);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(ref Vector2 pOut, ImFontPtr self, float size, float maxWidth, float wrapWidth, string textBegin, ref byte textEnd, ref byte* remaining)
|
|
{
|
|
fixed (Vector2* ppOut = &pOut)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textBegin != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textBegin);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textBegin, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
CalcTextSizeANative((Vector2*)ppOut, self, size, maxWidth, wrapWidth, pStr0, (byte*)ptextEnd, (byte**)premaining);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void CalcTextSizeA(ref Vector2 pOut, ImFontPtr self, float size, float maxWidth, float wrapWidth, string textBegin, ReadOnlySpan<byte> textEnd, ref byte* remaining)
|
|
{
|
|
fixed (Vector2* ppOut = &pOut)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textBegin != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textBegin);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textBegin, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
fixed (byte** premaining = &remaining)
|
|
{
|
|
CalcTextSizeANative((Vector2*)ppOut, self, size, maxWidth, wrapWidth, pStr0, (byte*)ptextEnd, (byte**)premaining);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|