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
using System; |
|
using System.Numerics; |
|
using System.Runtime.CompilerServices; |
|
using System.Text; |
|
|
|
namespace ImGuiNET |
|
{ |
|
public unsafe partial struct ImDrawData |
|
{ |
|
public byte Valid; |
|
public ImDrawList** CmdLists; |
|
public int CmdListsCount; |
|
public int TotalIdxCount; |
|
public int TotalVtxCount; |
|
public Vector2 DisplayPos; |
|
public Vector2 DisplaySize; |
|
} |
|
public unsafe partial struct ImDrawDataPtr |
|
{ |
|
public ImDrawData* NativePtr { get; } |
|
public ImDrawDataPtr(ImDrawData* nativePtr) => NativePtr = nativePtr; |
|
public ImDrawDataPtr(IntPtr nativePtr) => NativePtr = (ImDrawData*)nativePtr; |
|
public static implicit operator ImDrawDataPtr(ImDrawData* nativePtr) => new ImDrawDataPtr(nativePtr); |
|
public static implicit operator ImDrawData* (ImDrawDataPtr wrappedPtr) => wrappedPtr.NativePtr; |
|
public static implicit operator ImDrawDataPtr(IntPtr nativePtr) => new ImDrawDataPtr(nativePtr); |
|
public ref Bool8 Valid => ref Unsafe.AsRef<Bool8>(&NativePtr->Valid); |
|
public IntPtr CmdLists { get => (IntPtr)NativePtr->CmdLists; set => NativePtr->CmdLists = (ImDrawList**)value; } |
|
public ref int CmdListsCount => ref Unsafe.AsRef<int>(&NativePtr->CmdListsCount); |
|
public ref int TotalIdxCount => ref Unsafe.AsRef<int>(&NativePtr->TotalIdxCount); |
|
public ref int TotalVtxCount => ref Unsafe.AsRef<int>(&NativePtr->TotalVtxCount); |
|
public ref Vector2 DisplayPos => ref Unsafe.AsRef<Vector2>(&NativePtr->DisplayPos); |
|
public ref Vector2 DisplaySize => ref Unsafe.AsRef<Vector2>(&NativePtr->DisplaySize); |
|
public void ScaleClipRects(Vector2 sc) |
|
{ |
|
ImGuiNative.ImDrawData_ScaleClipRects(NativePtr, sc); |
|
} |
|
public void DeIndexAllBuffers() |
|
{ |
|
ImGuiNative.ImDrawData_DeIndexAllBuffers(NativePtr); |
|
} |
|
public void Clear() |
|
{ |
|
ImGuiNative.ImDrawData_Clear(NativePtr); |
|
} |
|
} |
|
}
|
|
|