You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
2.0 KiB
46 lines
2.0 KiB
6 years ago
|
using System;
|
||
|
using System.Numerics;
|
||
|
using System.Runtime.CompilerServices;
|
||
|
using System.Text;
|
||
|
|
||
|
namespace ImGuiNET
|
||
|
{
|
||
5 years ago
|
public unsafe partial struct ImFontAtlasCustomRect
|
||
6 years ago
|
{
|
||
|
public uint ID;
|
||
|
public ushort Width;
|
||
|
public ushort Height;
|
||
|
public ushort X;
|
||
|
public ushort Y;
|
||
|
public float GlyphAdvanceX;
|
||
|
public Vector2 GlyphOffset;
|
||
|
public ImFont* Font;
|
||
|
}
|
||
5 years ago
|
public unsafe partial struct ImFontAtlasCustomRectPtr
|
||
6 years ago
|
{
|
||
5 years ago
|
public ImFontAtlasCustomRect* NativePtr { get; }
|
||
|
public ImFontAtlasCustomRectPtr(ImFontAtlasCustomRect* nativePtr) => NativePtr = nativePtr;
|
||
|
public ImFontAtlasCustomRectPtr(IntPtr nativePtr) => NativePtr = (ImFontAtlasCustomRect*)nativePtr;
|
||
|
public static implicit operator ImFontAtlasCustomRectPtr(ImFontAtlasCustomRect* nativePtr) => new ImFontAtlasCustomRectPtr(nativePtr);
|
||
|
public static implicit operator ImFontAtlasCustomRect* (ImFontAtlasCustomRectPtr wrappedPtr) => wrappedPtr.NativePtr;
|
||
|
public static implicit operator ImFontAtlasCustomRectPtr(IntPtr nativePtr) => new ImFontAtlasCustomRectPtr(nativePtr);
|
||
6 years ago
|
public ref uint ID => ref Unsafe.AsRef<uint>(&NativePtr->ID);
|
||
|
public ref ushort Width => ref Unsafe.AsRef<ushort>(&NativePtr->Width);
|
||
|
public ref ushort Height => ref Unsafe.AsRef<ushort>(&NativePtr->Height);
|
||
|
public ref ushort X => ref Unsafe.AsRef<ushort>(&NativePtr->X);
|
||
|
public ref ushort Y => ref Unsafe.AsRef<ushort>(&NativePtr->Y);
|
||
|
public ref float GlyphAdvanceX => ref Unsafe.AsRef<float>(&NativePtr->GlyphAdvanceX);
|
||
|
public ref Vector2 GlyphOffset => ref Unsafe.AsRef<Vector2>(&NativePtr->GlyphOffset);
|
||
|
public ImFontPtr Font => new ImFontPtr(NativePtr->Font);
|
||
5 years ago
|
public void Destroy()
|
||
|
{
|
||
5 years ago
|
ImGuiNative.ImFontAtlasCustomRect_destroy(NativePtr);
|
||
5 years ago
|
}
|
||
6 years ago
|
public bool IsPacked()
|
||
|
{
|
||
5 years ago
|
byte ret = ImGuiNative.ImFontAtlasCustomRect_IsPacked(NativePtr);
|
||
6 years ago
|
return ret != 0;
|
||
|
}
|
||
|
}
|
||
|
}
|