|
|
|
@ -46,114 +46,154 @@ namespace ImGuiNET |
|
|
|
|
public ref int _ChannelsCurrent => ref Unsafe.AsRef<int>(&NativePtr->_ChannelsCurrent); |
|
|
|
|
public ref int _ChannelsCount => ref Unsafe.AsRef<int>(&NativePtr->_ChannelsCount); |
|
|
|
|
public ImPtrVector<ImDrawChannelPtr> _Channels => new ImPtrVector<ImDrawChannelPtr>(NativePtr->_Channels, Unsafe.SizeOf<ImDrawChannel>()); |
|
|
|
|
public void ChannelsSetCurrent(int channel_index) |
|
|
|
|
public void AddBezierCurve(Vector2 pos0, Vector2 cp0, Vector2 cp1, Vector2 pos1, uint col, float thickness) |
|
|
|
|
{ |
|
|
|
|
ImGuiNative.ImDrawList_ChannelsSetCurrent(NativePtr, channel_index); |
|
|
|
|
int num_segments = 0; |
|
|
|
|
ImGuiNative.ImDrawList_AddBezierCurve(NativePtr, pos0, cp0, cp1, pos1, col, thickness, num_segments); |
|
|
|
|
} |
|
|
|
|
public void ChannelsSplit(int channels_count) |
|
|
|
|
public void AddBezierCurve(Vector2 pos0, Vector2 cp0, Vector2 cp1, Vector2 pos1, uint col, float thickness, int num_segments) |
|
|
|
|
{ |
|
|
|
|
ImGuiNative.ImDrawList_ChannelsSplit(NativePtr, channels_count); |
|
|
|
|
ImGuiNative.ImDrawList_AddBezierCurve(NativePtr, pos0, cp0, cp1, pos1, col, thickness, num_segments); |
|
|
|
|
} |
|
|
|
|
public void AddQuad(Vector2 a, Vector2 b, Vector2 c, Vector2 d, uint col) |
|
|
|
|
public void AddCallback(IntPtr callback, IntPtr callback_data) |
|
|
|
|
{ |
|
|
|
|
void* native_callback_data = (void*)callback_data.ToPointer(); |
|
|
|
|
ImGuiNative.ImDrawList_AddCallback(NativePtr, callback, native_callback_data); |
|
|
|
|
} |
|
|
|
|
public void AddCircle(Vector2 centre, float radius, uint col) |
|
|
|
|
{ |
|
|
|
|
int num_segments = 12; |
|
|
|
|
float thickness = 1.0f; |
|
|
|
|
ImGuiNative.ImDrawList_AddQuad(NativePtr, a, b, c, d, col, thickness); |
|
|
|
|
ImGuiNative.ImDrawList_AddCircle(NativePtr, centre, radius, col, num_segments, thickness); |
|
|
|
|
} |
|
|
|
|
public void AddQuad(Vector2 a, Vector2 b, Vector2 c, Vector2 d, uint col, float thickness) |
|
|
|
|
public void AddCircle(Vector2 centre, float radius, uint col, int num_segments) |
|
|
|
|
{ |
|
|
|
|
ImGuiNative.ImDrawList_AddQuad(NativePtr, a, b, c, d, col, thickness); |
|
|
|
|
float thickness = 1.0f; |
|
|
|
|
ImGuiNative.ImDrawList_AddCircle(NativePtr, centre, radius, col, num_segments, thickness); |
|
|
|
|
} |
|
|
|
|
public void AddPolyline(ref Vector2 points, int num_points, uint col, bool closed, float thickness) |
|
|
|
|
public void AddCircle(Vector2 centre, float radius, uint col, int num_segments, float thickness) |
|
|
|
|
{ |
|
|
|
|
ImGuiNative.ImDrawList_AddCircle(NativePtr, centre, radius, col, num_segments, thickness); |
|
|
|
|
} |
|
|
|
|
public void AddCircleFilled(Vector2 centre, float radius, uint col) |
|
|
|
|
{ |
|
|
|
|
int num_segments = 12; |
|
|
|
|
ImGuiNative.ImDrawList_AddCircleFilled(NativePtr, centre, radius, col, num_segments); |
|
|
|
|
} |
|
|
|
|
public void AddCircleFilled(Vector2 centre, float radius, uint col, int num_segments) |
|
|
|
|
{ |
|
|
|
|
ImGuiNative.ImDrawList_AddCircleFilled(NativePtr, centre, radius, col, num_segments); |
|
|
|
|
} |
|
|
|
|
public void AddConvexPolyFilled(ref Vector2 points, int num_points, uint col) |
|
|
|
|
{ |
|
|
|
|
byte native_closed = closed ? (byte)1 : (byte)0; |
|
|
|
|
fixed (Vector2* native_points = &points) |
|
|
|
|
{ |
|
|
|
|
ImGuiNative.ImDrawList_AddPolyline(NativePtr, native_points, num_points, col, native_closed, thickness); |
|
|
|
|
ImGuiNative.ImDrawList_AddConvexPolyFilled(NativePtr, native_points, num_points, col); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
public void PopClipRect() |
|
|
|
|
public void AddDrawCmd() |
|
|
|
|
{ |
|
|
|
|
ImGuiNative.ImDrawList_PopClipRect(NativePtr); |
|
|
|
|
ImGuiNative.ImDrawList_AddDrawCmd(NativePtr); |
|
|
|
|
} |
|
|
|
|
public void PushClipRect(Vector2 clip_rect_min, Vector2 clip_rect_max) |
|
|
|
|
public void AddImage(IntPtr user_texture_id, Vector2 a, Vector2 b) |
|
|
|
|
{ |
|
|
|
|
byte intersect_with_current_clip_rect = 0; |
|
|
|
|
ImGuiNative.ImDrawList_PushClipRect(NativePtr, clip_rect_min, clip_rect_max, intersect_with_current_clip_rect); |
|
|
|
|
Vector2 uv_a = new Vector2(); |
|
|
|
|
Vector2 uv_b = new Vector2(1, 1); |
|
|
|
|
uint col = 0xFFFFFFFF; |
|
|
|
|
ImGuiNative.ImDrawList_AddImage(NativePtr, user_texture_id, a, b, uv_a, uv_b, col); |
|
|
|
|
} |
|
|
|
|
public void PushClipRect(Vector2 clip_rect_min, Vector2 clip_rect_max, bool intersect_with_current_clip_rect) |
|
|
|
|
public void AddImage(IntPtr user_texture_id, Vector2 a, Vector2 b, Vector2 uv_a) |
|
|
|
|
{ |
|
|
|
|
byte native_intersect_with_current_clip_rect = intersect_with_current_clip_rect ? (byte)1 : (byte)0; |
|
|
|
|
ImGuiNative.ImDrawList_PushClipRect(NativePtr, clip_rect_min, clip_rect_max, native_intersect_with_current_clip_rect); |
|
|
|
|
Vector2 uv_b = new Vector2(1, 1); |
|
|
|
|
uint col = 0xFFFFFFFF; |
|
|
|
|
ImGuiNative.ImDrawList_AddImage(NativePtr, user_texture_id, a, b, uv_a, uv_b, col); |
|
|
|
|
} |
|
|
|
|
public void PathBezierCurveTo(Vector2 p1, Vector2 p2, Vector2 p3) |
|
|
|
|
public void AddImage(IntPtr user_texture_id, Vector2 a, Vector2 b, Vector2 uv_a, Vector2 uv_b) |
|
|
|
|
{ |
|
|
|
|
int num_segments = 0; |
|
|
|
|
ImGuiNative.ImDrawList_PathBezierCurveTo(NativePtr, p1, p2, p3, num_segments); |
|
|
|
|
uint col = 0xFFFFFFFF; |
|
|
|
|
ImGuiNative.ImDrawList_AddImage(NativePtr, user_texture_id, a, b, uv_a, uv_b, col); |
|
|
|
|
} |
|
|
|
|
public void PathBezierCurveTo(Vector2 p1, Vector2 p2, Vector2 p3, int num_segments) |
|
|
|
|
public void AddImage(IntPtr user_texture_id, Vector2 a, Vector2 b, Vector2 uv_a, Vector2 uv_b, uint col) |
|
|
|
|
{ |
|
|
|
|
ImGuiNative.ImDrawList_PathBezierCurveTo(NativePtr, p1, p2, p3, num_segments); |
|
|
|
|
ImGuiNative.ImDrawList_AddImage(NativePtr, user_texture_id, a, b, uv_a, uv_b, col); |
|
|
|
|
} |
|
|
|
|
public void UpdateTextureID() |
|
|
|
|
public void AddImageQuad(IntPtr user_texture_id, Vector2 a, Vector2 b, Vector2 c, Vector2 d) |
|
|
|
|
{ |
|
|
|
|
ImGuiNative.ImDrawList_UpdateTextureID(NativePtr); |
|
|
|
|
Vector2 uv_a = new Vector2(); |
|
|
|
|
Vector2 uv_b = new Vector2(1, 0); |
|
|
|
|
Vector2 uv_c = new Vector2(1, 1); |
|
|
|
|
Vector2 uv_d = new Vector2(0, 1); |
|
|
|
|
uint col = 0xFFFFFFFF; |
|
|
|
|
ImGuiNative.ImDrawList_AddImageQuad(NativePtr, user_texture_id, a, b, c, d, uv_a, uv_b, uv_c, uv_d, col); |
|
|
|
|
} |
|
|
|
|
public void Clear() |
|
|
|
|
public void AddImageQuad(IntPtr user_texture_id, Vector2 a, Vector2 b, Vector2 c, Vector2 d, Vector2 uv_a) |
|
|
|
|
{ |
|
|
|
|
ImGuiNative.ImDrawList_Clear(NativePtr); |
|
|
|
|
Vector2 uv_b = new Vector2(1, 0); |
|
|
|
|
Vector2 uv_c = new Vector2(1, 1); |
|
|
|
|
Vector2 uv_d = new Vector2(0, 1); |
|
|
|
|
uint col = 0xFFFFFFFF; |
|
|
|
|
ImGuiNative.ImDrawList_AddImageQuad(NativePtr, user_texture_id, a, b, c, d, uv_a, uv_b, uv_c, uv_d, col); |
|
|
|
|
} |
|
|
|
|
public void AddBezierCurve(Vector2 pos0, Vector2 cp0, Vector2 cp1, Vector2 pos1, uint col, float thickness) |
|
|
|
|
public void AddImageQuad(IntPtr user_texture_id, Vector2 a, Vector2 b, Vector2 c, Vector2 d, Vector2 uv_a, Vector2 uv_b) |
|
|
|
|
{ |
|
|
|
|
int num_segments = 0; |
|
|
|
|
ImGuiNative.ImDrawList_AddBezierCurve(NativePtr, pos0, cp0, cp1, pos1, col, thickness, num_segments); |
|
|
|
|
Vector2 uv_c = new Vector2(1, 1); |
|
|
|
|
Vector2 uv_d = new Vector2(0, 1); |
|
|
|
|
uint col = 0xFFFFFFFF; |
|
|
|
|
ImGuiNative.ImDrawList_AddImageQuad(NativePtr, user_texture_id, a, b, c, d, uv_a, uv_b, uv_c, uv_d, col); |
|
|
|
|
} |
|
|
|
|
public void AddBezierCurve(Vector2 pos0, Vector2 cp0, Vector2 cp1, Vector2 pos1, uint col, float thickness, int num_segments) |
|
|
|
|
public void AddImageQuad(IntPtr user_texture_id, Vector2 a, Vector2 b, Vector2 c, Vector2 d, Vector2 uv_a, Vector2 uv_b, Vector2 uv_c) |
|
|
|
|
{ |
|
|
|
|
ImGuiNative.ImDrawList_AddBezierCurve(NativePtr, pos0, cp0, cp1, pos1, col, thickness, num_segments); |
|
|
|
|
Vector2 uv_d = new Vector2(0, 1); |
|
|
|
|
uint col = 0xFFFFFFFF; |
|
|
|
|
ImGuiNative.ImDrawList_AddImageQuad(NativePtr, user_texture_id, a, b, c, d, uv_a, uv_b, uv_c, uv_d, col); |
|
|
|
|
} |
|
|
|
|
public void PushTextureID(IntPtr texture_id) |
|
|
|
|
public void AddImageQuad(IntPtr user_texture_id, Vector2 a, Vector2 b, Vector2 c, Vector2 d, Vector2 uv_a, Vector2 uv_b, Vector2 uv_c, Vector2 uv_d) |
|
|
|
|
{ |
|
|
|
|
ImGuiNative.ImDrawList_PushTextureID(NativePtr, texture_id); |
|
|
|
|
uint col = 0xFFFFFFFF; |
|
|
|
|
ImGuiNative.ImDrawList_AddImageQuad(NativePtr, user_texture_id, a, b, c, d, uv_a, uv_b, uv_c, uv_d, col); |
|
|
|
|
} |
|
|
|
|
public void AddRectFilled(Vector2 a, Vector2 b, uint col) |
|
|
|
|
public void AddImageQuad(IntPtr user_texture_id, Vector2 a, Vector2 b, Vector2 c, Vector2 d, Vector2 uv_a, Vector2 uv_b, Vector2 uv_c, Vector2 uv_d, uint col) |
|
|
|
|
{ |
|
|
|
|
float rounding = 0.0f; |
|
|
|
|
int rounding_corners_flags = (int)ImDrawCornerFlags.All; |
|
|
|
|
ImGuiNative.ImDrawList_AddRectFilled(NativePtr, a, b, col, rounding, rounding_corners_flags); |
|
|
|
|
ImGuiNative.ImDrawList_AddImageQuad(NativePtr, user_texture_id, a, b, c, d, uv_a, uv_b, uv_c, uv_d, col); |
|
|
|
|
} |
|
|
|
|
public void AddRectFilled(Vector2 a, Vector2 b, uint col, float rounding) |
|
|
|
|
public void AddImageRounded(IntPtr user_texture_id, Vector2 a, Vector2 b, Vector2 uv_a, Vector2 uv_b, uint col, float rounding) |
|
|
|
|
{ |
|
|
|
|
int rounding_corners_flags = (int)ImDrawCornerFlags.All; |
|
|
|
|
ImGuiNative.ImDrawList_AddRectFilled(NativePtr, a, b, col, rounding, rounding_corners_flags); |
|
|
|
|
int rounding_corners = (int)ImDrawCornerFlags.All; |
|
|
|
|
ImGuiNative.ImDrawList_AddImageRounded(NativePtr, user_texture_id, a, b, uv_a, uv_b, col, rounding, rounding_corners); |
|
|
|
|
} |
|
|
|
|
public void AddRectFilled(Vector2 a, Vector2 b, uint col, float rounding, int rounding_corners_flags) |
|
|
|
|
public void AddImageRounded(IntPtr user_texture_id, Vector2 a, Vector2 b, Vector2 uv_a, Vector2 uv_b, uint col, float rounding, int rounding_corners) |
|
|
|
|
{ |
|
|
|
|
ImGuiNative.ImDrawList_AddRectFilled(NativePtr, a, b, col, rounding, rounding_corners_flags); |
|
|
|
|
ImGuiNative.ImDrawList_AddImageRounded(NativePtr, user_texture_id, a, b, uv_a, uv_b, col, rounding, rounding_corners); |
|
|
|
|
} |
|
|
|
|
public void AddDrawCmd() |
|
|
|
|
public void AddLine(Vector2 a, Vector2 b, uint col) |
|
|
|
|
{ |
|
|
|
|
ImGuiNative.ImDrawList_AddDrawCmd(NativePtr); |
|
|
|
|
float thickness = 1.0f; |
|
|
|
|
ImGuiNative.ImDrawList_AddLine(NativePtr, a, b, col, thickness); |
|
|
|
|
} |
|
|
|
|
public void UpdateClipRect() |
|
|
|
|
public void AddLine(Vector2 a, Vector2 b, uint col, float thickness) |
|
|
|
|
{ |
|
|
|
|
ImGuiNative.ImDrawList_UpdateClipRect(NativePtr); |
|
|
|
|
ImGuiNative.ImDrawList_AddLine(NativePtr, a, b, col, thickness); |
|
|
|
|
} |
|
|
|
|
public void PrimVtx(Vector2 pos, Vector2 uv, uint col) |
|
|
|
|
public void AddPolyline(ref Vector2 points, int num_points, uint col, bool closed, float thickness) |
|
|
|
|
{ |
|
|
|
|
ImGuiNative.ImDrawList_PrimVtx(NativePtr, pos, uv, col); |
|
|
|
|
byte native_closed = closed ? (byte)1 : (byte)0; |
|
|
|
|
fixed (Vector2* native_points = &points) |
|
|
|
|
{ |
|
|
|
|
ImGuiNative.ImDrawList_AddPolyline(NativePtr, native_points, num_points, col, native_closed, thickness); |
|
|
|
|
} |
|
|
|
|
public void PrimRect(Vector2 a, Vector2 b, uint col) |
|
|
|
|
} |
|
|
|
|
public void AddQuad(Vector2 a, Vector2 b, Vector2 c, Vector2 d, uint col) |
|
|
|
|
{ |
|
|
|
|
ImGuiNative.ImDrawList_PrimRect(NativePtr, a, b, col); |
|
|
|
|
float thickness = 1.0f; |
|
|
|
|
ImGuiNative.ImDrawList_AddQuad(NativePtr, a, b, c, d, col, thickness); |
|
|
|
|
} |
|
|
|
|
public void ClearFreeMemory() |
|
|
|
|
public void AddQuad(Vector2 a, Vector2 b, Vector2 c, Vector2 d, uint col, float thickness) |
|
|
|
|
{ |
|
|
|
|
ImGuiNative.ImDrawList_ClearFreeMemory(NativePtr); |
|
|
|
|
ImGuiNative.ImDrawList_AddQuad(NativePtr, a, b, c, d, col, thickness); |
|
|
|
|
} |
|
|
|
|
public ImDrawListPtr CloneOutput() |
|
|
|
|
public void AddQuadFilled(Vector2 a, Vector2 b, Vector2 c, Vector2 d, uint col) |
|
|
|
|
{ |
|
|
|
|
ImDrawList* ret = ImGuiNative.ImDrawList_CloneOutput(NativePtr); |
|
|
|
|
return new ImDrawListPtr(ret); |
|
|
|
|
ImGuiNative.ImDrawList_AddQuadFilled(NativePtr, a, b, c, d, col); |
|
|
|
|
} |
|
|
|
|
public void AddRect(Vector2 a, Vector2 b, uint col) |
|
|
|
|
{ |
|
|
|
@ -177,238 +217,198 @@ namespace ImGuiNET |
|
|
|
|
{ |
|
|
|
|
ImGuiNative.ImDrawList_AddRect(NativePtr, a, b, col, rounding, rounding_corners_flags, thickness); |
|
|
|
|
} |
|
|
|
|
public void AddCallback(IntPtr callback, IntPtr callback_data) |
|
|
|
|
{ |
|
|
|
|
void* native_callback_data = (void*)callback_data.ToPointer(); |
|
|
|
|
ImGuiNative.ImDrawList_AddCallback(NativePtr, callback, native_callback_data); |
|
|
|
|
} |
|
|
|
|
public void PathRect(Vector2 rect_min, Vector2 rect_max) |
|
|
|
|
public void AddRectFilled(Vector2 a, Vector2 b, uint col) |
|
|
|
|
{ |
|
|
|
|
float rounding = 0.0f; |
|
|
|
|
int rounding_corners_flags = (int)ImDrawCornerFlags.All; |
|
|
|
|
ImGuiNative.ImDrawList_PathRect(NativePtr, rect_min, rect_max, rounding, rounding_corners_flags); |
|
|
|
|
ImGuiNative.ImDrawList_AddRectFilled(NativePtr, a, b, col, rounding, rounding_corners_flags); |
|
|
|
|
} |
|
|
|
|
public void PathRect(Vector2 rect_min, Vector2 rect_max, float rounding) |
|
|
|
|
public void AddRectFilled(Vector2 a, Vector2 b, uint col, float rounding) |
|
|
|
|
{ |
|
|
|
|
int rounding_corners_flags = (int)ImDrawCornerFlags.All; |
|
|
|
|
ImGuiNative.ImDrawList_PathRect(NativePtr, rect_min, rect_max, rounding, rounding_corners_flags); |
|
|
|
|
ImGuiNative.ImDrawList_AddRectFilled(NativePtr, a, b, col, rounding, rounding_corners_flags); |
|
|
|
|
} |
|
|
|
|
public void PathRect(Vector2 rect_min, Vector2 rect_max, float rounding, int rounding_corners_flags) |
|
|
|
|
public void AddRectFilled(Vector2 a, Vector2 b, uint col, float rounding, int rounding_corners_flags) |
|
|
|
|
{ |
|
|
|
|
ImGuiNative.ImDrawList_PathRect(NativePtr, rect_min, rect_max, rounding, rounding_corners_flags); |
|
|
|
|
ImGuiNative.ImDrawList_AddRectFilled(NativePtr, a, b, col, rounding, rounding_corners_flags); |
|
|
|
|
} |
|
|
|
|
public void PathArcToFast(Vector2 centre, float radius, int a_min_of_12, int a_max_of_12) |
|
|
|
|
public void AddRectFilledMultiColor(Vector2 a, Vector2 b, uint col_upr_left, uint col_upr_right, uint col_bot_right, uint col_bot_left) |
|
|
|
|
{ |
|
|
|
|
ImGuiNative.ImDrawList_PathArcToFast(NativePtr, centre, radius, a_min_of_12, a_max_of_12); |
|
|
|
|
ImGuiNative.ImDrawList_AddRectFilledMultiColor(NativePtr, a, b, col_upr_left, col_upr_right, col_bot_right, col_bot_left); |
|
|
|
|
} |
|
|
|
|
public void PathStroke(uint col, bool closed) |
|
|
|
|
public void AddTriangle(Vector2 a, Vector2 b, Vector2 c, uint col) |
|
|
|
|
{ |
|
|
|
|
byte native_closed = closed ? (byte)1 : (byte)0; |
|
|
|
|
float thickness = 1.0f; |
|
|
|
|
ImGuiNative.ImDrawList_PathStroke(NativePtr, col, native_closed, thickness); |
|
|
|
|
ImGuiNative.ImDrawList_AddTriangle(NativePtr, a, b, c, col, thickness); |
|
|
|
|
} |
|
|
|
|
public void PathStroke(uint col, bool closed, float thickness) |
|
|
|
|
public void AddTriangle(Vector2 a, Vector2 b, Vector2 c, uint col, float thickness) |
|
|
|
|
{ |
|
|
|
|
byte native_closed = closed ? (byte)1 : (byte)0; |
|
|
|
|
ImGuiNative.ImDrawList_PathStroke(NativePtr, col, native_closed, thickness); |
|
|
|
|
ImGuiNative.ImDrawList_AddTriangle(NativePtr, a, b, c, col, thickness); |
|
|
|
|
} |
|
|
|
|
public void PathFillConvex(uint col) |
|
|
|
|
public void AddTriangleFilled(Vector2 a, Vector2 b, Vector2 c, uint col) |
|
|
|
|
{ |
|
|
|
|
ImGuiNative.ImDrawList_PathFillConvex(NativePtr, col); |
|
|
|
|
ImGuiNative.ImDrawList_AddTriangleFilled(NativePtr, a, b, c, col); |
|
|
|
|
} |
|
|
|
|
public void PathLineToMergeDuplicate(Vector2 pos) |
|
|
|
|
public void ChannelsMerge() |
|
|
|
|
{ |
|
|
|
|
ImGuiNative.ImDrawList_PathLineToMergeDuplicate(NativePtr, pos); |
|
|
|
|
ImGuiNative.ImDrawList_ChannelsMerge(NativePtr); |
|
|
|
|
} |
|
|
|
|
public void PathArcTo(Vector2 centre, float radius, float a_min, float a_max) |
|
|
|
|
public void ChannelsSetCurrent(int channel_index) |
|
|
|
|
{ |
|
|
|
|
int num_segments = 10; |
|
|
|
|
ImGuiNative.ImDrawList_PathArcTo(NativePtr, centre, radius, a_min, a_max, num_segments); |
|
|
|
|
ImGuiNative.ImDrawList_ChannelsSetCurrent(NativePtr, channel_index); |
|
|
|
|
} |
|
|
|
|
public void PathArcTo(Vector2 centre, float radius, float a_min, float a_max, int num_segments) |
|
|
|
|
public void ChannelsSplit(int channels_count) |
|
|
|
|
{ |
|
|
|
|
ImGuiNative.ImDrawList_PathArcTo(NativePtr, centre, radius, a_min, a_max, num_segments); |
|
|
|
|
ImGuiNative.ImDrawList_ChannelsSplit(NativePtr, channels_count); |
|
|
|
|
} |
|
|
|
|
public void AddConvexPolyFilled(ref Vector2 points, int num_points, uint col) |
|
|
|
|
{ |
|
|
|
|
fixed (Vector2* native_points = &points) |
|
|
|
|
public void Clear() |
|
|
|
|
{ |
|
|
|
|
ImGuiNative.ImDrawList_AddConvexPolyFilled(NativePtr, native_points, num_points, col); |
|
|
|
|
} |
|
|
|
|
ImGuiNative.ImDrawList_Clear(NativePtr); |
|
|
|
|
} |
|
|
|
|
public void AddImageQuad(IntPtr user_texture_id, Vector2 a, Vector2 b, Vector2 c, Vector2 d) |
|
|
|
|
public void ClearFreeMemory() |
|
|
|
|
{ |
|
|
|
|
Vector2 uv_a = new Vector2(); |
|
|
|
|
Vector2 uv_b = new Vector2(1, 0); |
|
|
|
|
Vector2 uv_c = new Vector2(1, 1); |
|
|
|
|
Vector2 uv_d = new Vector2(0, 1); |
|
|
|
|
uint col = 0xFFFFFFFF; |
|
|
|
|
ImGuiNative.ImDrawList_AddImageQuad(NativePtr, user_texture_id, a, b, c, d, uv_a, uv_b, uv_c, uv_d, col); |
|
|
|
|
ImGuiNative.ImDrawList_ClearFreeMemory(NativePtr); |
|
|
|
|
} |
|
|
|
|
public void AddImageQuad(IntPtr user_texture_id, Vector2 a, Vector2 b, Vector2 c, Vector2 d, Vector2 uv_a) |
|
|
|
|
public ImDrawListPtr CloneOutput() |
|
|
|
|
{ |
|
|
|
|
Vector2 uv_b = new Vector2(1, 0); |
|
|
|
|
Vector2 uv_c = new Vector2(1, 1); |
|
|
|
|
Vector2 uv_d = new Vector2(0, 1); |
|
|
|
|
uint col = 0xFFFFFFFF; |
|
|
|
|
ImGuiNative.ImDrawList_AddImageQuad(NativePtr, user_texture_id, a, b, c, d, uv_a, uv_b, uv_c, uv_d, col); |
|
|
|
|
ImDrawList* ret = ImGuiNative.ImDrawList_CloneOutput(NativePtr); |
|
|
|
|
return new ImDrawListPtr(ret); |
|
|
|
|
} |
|
|
|
|
public void AddImageQuad(IntPtr user_texture_id, Vector2 a, Vector2 b, Vector2 c, Vector2 d, Vector2 uv_a, Vector2 uv_b) |
|
|
|
|
public Vector2 GetClipRectMax() |
|
|
|
|
{ |
|
|
|
|
Vector2 uv_c = new Vector2(1, 1); |
|
|
|
|
Vector2 uv_d = new Vector2(0, 1); |
|
|
|
|
uint col = 0xFFFFFFFF; |
|
|
|
|
ImGuiNative.ImDrawList_AddImageQuad(NativePtr, user_texture_id, a, b, c, d, uv_a, uv_b, uv_c, uv_d, col); |
|
|
|
|
Vector2 ret = ImGuiNative.ImDrawList_GetClipRectMax(NativePtr); |
|
|
|
|
return ret; |
|
|
|
|
} |
|
|
|
|
public void AddImageQuad(IntPtr user_texture_id, Vector2 a, Vector2 b, Vector2 c, Vector2 d, Vector2 uv_a, Vector2 uv_b, Vector2 uv_c) |
|
|
|
|
public Vector2 GetClipRectMin() |
|
|
|
|
{ |
|
|
|
|
Vector2 uv_d = new Vector2(0, 1); |
|
|
|
|
uint col = 0xFFFFFFFF; |
|
|
|
|
ImGuiNative.ImDrawList_AddImageQuad(NativePtr, user_texture_id, a, b, c, d, uv_a, uv_b, uv_c, uv_d, col); |
|
|
|
|
Vector2 ret = ImGuiNative.ImDrawList_GetClipRectMin(NativePtr); |
|
|
|
|
return ret; |
|
|
|
|
} |
|
|
|
|
public void AddImageQuad(IntPtr user_texture_id, Vector2 a, Vector2 b, Vector2 c, Vector2 d, Vector2 uv_a, Vector2 uv_b, Vector2 uv_c, Vector2 uv_d) |
|
|
|
|
public void PathArcTo(Vector2 centre, float radius, float a_min, float a_max) |
|
|
|
|
{ |
|
|
|
|
uint col = 0xFFFFFFFF; |
|
|
|
|
ImGuiNative.ImDrawList_AddImageQuad(NativePtr, user_texture_id, a, b, c, d, uv_a, uv_b, uv_c, uv_d, col); |
|
|
|
|
int num_segments = 10; |
|
|
|
|
ImGuiNative.ImDrawList_PathArcTo(NativePtr, centre, radius, a_min, a_max, num_segments); |
|
|
|
|
} |
|
|
|
|
public void AddImageQuad(IntPtr user_texture_id, Vector2 a, Vector2 b, Vector2 c, Vector2 d, Vector2 uv_a, Vector2 uv_b, Vector2 uv_c, Vector2 uv_d, uint col) |
|
|
|
|
public void PathArcTo(Vector2 centre, float radius, float a_min, float a_max, int num_segments) |
|
|
|
|
{ |
|
|
|
|
ImGuiNative.ImDrawList_AddImageQuad(NativePtr, user_texture_id, a, b, c, d, uv_a, uv_b, uv_c, uv_d, col); |
|
|
|
|
ImGuiNative.ImDrawList_PathArcTo(NativePtr, centre, radius, a_min, a_max, num_segments); |
|
|
|
|
} |
|
|
|
|
public void AddImage(IntPtr user_texture_id, Vector2 a, Vector2 b) |
|
|
|
|
public void PathArcToFast(Vector2 centre, float radius, int a_min_of_12, int a_max_of_12) |
|
|
|
|
{ |
|
|
|
|
Vector2 uv_a = new Vector2(); |
|
|
|
|
Vector2 uv_b = new Vector2(1, 1); |
|
|
|
|
uint col = 0xFFFFFFFF; |
|
|
|
|
ImGuiNative.ImDrawList_AddImage(NativePtr, user_texture_id, a, b, uv_a, uv_b, col); |
|
|
|
|
ImGuiNative.ImDrawList_PathArcToFast(NativePtr, centre, radius, a_min_of_12, a_max_of_12); |
|
|
|
|
} |
|
|
|
|
public void AddImage(IntPtr user_texture_id, Vector2 a, Vector2 b, Vector2 uv_a) |
|
|
|
|
public void PathBezierCurveTo(Vector2 p1, Vector2 p2, Vector2 p3) |
|
|
|
|
{ |
|
|
|
|
Vector2 uv_b = new Vector2(1, 1); |
|
|
|
|
uint col = 0xFFFFFFFF; |
|
|
|
|
ImGuiNative.ImDrawList_AddImage(NativePtr, user_texture_id, a, b, uv_a, uv_b, col); |
|
|
|
|
int num_segments = 0; |
|
|
|
|
ImGuiNative.ImDrawList_PathBezierCurveTo(NativePtr, p1, p2, p3, num_segments); |
|
|
|
|
} |
|
|
|
|
public void AddImage(IntPtr user_texture_id, Vector2 a, Vector2 b, Vector2 uv_a, Vector2 uv_b) |
|
|
|
|
public void PathBezierCurveTo(Vector2 p1, Vector2 p2, Vector2 p3, int num_segments) |
|
|
|
|
{ |
|
|
|
|
uint col = 0xFFFFFFFF; |
|
|
|
|
ImGuiNative.ImDrawList_AddImage(NativePtr, user_texture_id, a, b, uv_a, uv_b, col); |
|
|
|
|
ImGuiNative.ImDrawList_PathBezierCurveTo(NativePtr, p1, p2, p3, num_segments); |
|
|
|
|
} |
|
|
|
|
public void AddImage(IntPtr user_texture_id, Vector2 a, Vector2 b, Vector2 uv_a, Vector2 uv_b, uint col) |
|
|
|
|
public void PathClear() |
|
|
|
|
{ |
|
|
|
|
ImGuiNative.ImDrawList_AddImage(NativePtr, user_texture_id, a, b, uv_a, uv_b, col); |
|
|
|
|
ImGuiNative.ImDrawList_PathClear(NativePtr); |
|
|
|
|
} |
|
|
|
|
public void AddCircleFilled(Vector2 centre, float radius, uint col) |
|
|
|
|
public void PathFillConvex(uint col) |
|
|
|
|
{ |
|
|
|
|
int num_segments = 12; |
|
|
|
|
ImGuiNative.ImDrawList_AddCircleFilled(NativePtr, centre, radius, col, num_segments); |
|
|
|
|
ImGuiNative.ImDrawList_PathFillConvex(NativePtr, col); |
|
|
|
|
} |
|
|
|
|
public void AddCircleFilled(Vector2 centre, float radius, uint col, int num_segments) |
|
|
|
|
public void PathLineTo(Vector2 pos) |
|
|
|
|
{ |
|
|
|
|
ImGuiNative.ImDrawList_AddCircleFilled(NativePtr, centre, radius, col, num_segments); |
|
|
|
|
ImGuiNative.ImDrawList_PathLineTo(NativePtr, pos); |
|
|
|
|
} |
|
|
|
|
public void AddCircle(Vector2 centre, float radius, uint col) |
|
|
|
|
public void PathLineToMergeDuplicate(Vector2 pos) |
|
|
|
|
{ |
|
|
|
|
int num_segments = 12; |
|
|
|
|
float thickness = 1.0f; |
|
|
|
|
ImGuiNative.ImDrawList_AddCircle(NativePtr, centre, radius, col, num_segments, thickness); |
|
|
|
|
ImGuiNative.ImDrawList_PathLineToMergeDuplicate(NativePtr, pos); |
|
|
|
|
} |
|
|
|
|
public void AddCircle(Vector2 centre, float radius, uint col, int num_segments) |
|
|
|
|
public void PathRect(Vector2 rect_min, Vector2 rect_max) |
|
|
|
|
{ |
|
|
|
|
float thickness = 1.0f; |
|
|
|
|
ImGuiNative.ImDrawList_AddCircle(NativePtr, centre, radius, col, num_segments, thickness); |
|
|
|
|
float rounding = 0.0f; |
|
|
|
|
int rounding_corners_flags = (int)ImDrawCornerFlags.All; |
|
|
|
|
ImGuiNative.ImDrawList_PathRect(NativePtr, rect_min, rect_max, rounding, rounding_corners_flags); |
|
|
|
|
} |
|
|
|
|
public void AddCircle(Vector2 centre, float radius, uint col, int num_segments, float thickness) |
|
|
|
|
public void PathRect(Vector2 rect_min, Vector2 rect_max, float rounding) |
|
|
|
|
{ |
|
|
|
|
ImGuiNative.ImDrawList_AddCircle(NativePtr, centre, radius, col, num_segments, thickness); |
|
|
|
|
int rounding_corners_flags = (int)ImDrawCornerFlags.All; |
|
|
|
|
ImGuiNative.ImDrawList_PathRect(NativePtr, rect_min, rect_max, rounding, rounding_corners_flags); |
|
|
|
|
} |
|
|
|
|
public void AddTriangleFilled(Vector2 a, Vector2 b, Vector2 c, uint col) |
|
|
|
|
public void PathRect(Vector2 rect_min, Vector2 rect_max, float rounding, int rounding_corners_flags) |
|
|
|
|
{ |
|
|
|
|
ImGuiNative.ImDrawList_AddTriangleFilled(NativePtr, a, b, c, col); |
|
|
|
|
ImGuiNative.ImDrawList_PathRect(NativePtr, rect_min, rect_max, rounding, rounding_corners_flags); |
|
|
|
|
} |
|
|
|
|
public void AddTriangle(Vector2 a, Vector2 b, Vector2 c, uint col) |
|
|
|
|
public void PathStroke(uint col, bool closed) |
|
|
|
|
{ |
|
|
|
|
byte native_closed = closed ? (byte)1 : (byte)0; |
|
|
|
|
float thickness = 1.0f; |
|
|
|
|
ImGuiNative.ImDrawList_AddTriangle(NativePtr, a, b, c, col, thickness); |
|
|
|
|
} |
|
|
|
|
public void AddTriangle(Vector2 a, Vector2 b, Vector2 c, uint col, float thickness) |
|
|
|
|
{ |
|
|
|
|
ImGuiNative.ImDrawList_AddTriangle(NativePtr, a, b, c, col, thickness); |
|
|
|
|
} |
|
|
|
|
public void AddQuadFilled(Vector2 a, Vector2 b, Vector2 c, Vector2 d, uint col) |
|
|
|
|
{ |
|
|
|
|
ImGuiNative.ImDrawList_AddQuadFilled(NativePtr, a, b, c, d, col); |
|
|
|
|
} |
|
|
|
|
public void PrimReserve(int idx_count, int vtx_count) |
|
|
|
|
{ |
|
|
|
|
ImGuiNative.ImDrawList_PrimReserve(NativePtr, idx_count, vtx_count); |
|
|
|
|
ImGuiNative.ImDrawList_PathStroke(NativePtr, col, native_closed, thickness); |
|
|
|
|
} |
|
|
|
|
public void AddRectFilledMultiColor(Vector2 a, Vector2 b, uint col_upr_left, uint col_upr_right, uint col_bot_right, uint col_bot_left) |
|
|
|
|
public void PathStroke(uint col, bool closed, float thickness) |
|
|
|
|
{ |
|
|
|
|
ImGuiNative.ImDrawList_AddRectFilledMultiColor(NativePtr, a, b, col_upr_left, col_upr_right, col_bot_right, col_bot_left); |
|
|
|
|
byte native_closed = closed ? (byte)1 : (byte)0; |
|
|
|
|
ImGuiNative.ImDrawList_PathStroke(NativePtr, col, native_closed, thickness); |
|
|
|
|
} |
|
|
|
|
public void AddLine(Vector2 a, Vector2 b, uint col) |
|
|
|
|
public void PopClipRect() |
|
|
|
|
{ |
|
|
|
|
float thickness = 1.0f; |
|
|
|
|
ImGuiNative.ImDrawList_AddLine(NativePtr, a, b, col, thickness); |
|
|
|
|
ImGuiNative.ImDrawList_PopClipRect(NativePtr); |
|
|
|
|
} |
|
|
|
|
public void AddLine(Vector2 a, Vector2 b, uint col, float thickness) |
|
|
|
|
public void PopTextureID() |
|
|
|
|
{ |
|
|
|
|
ImGuiNative.ImDrawList_AddLine(NativePtr, a, b, col, thickness); |
|
|
|
|
ImGuiNative.ImDrawList_PopTextureID(NativePtr); |
|
|
|
|
} |
|
|
|
|
public Vector2 GetClipRectMin() |
|
|
|
|
public void PrimQuadUV(Vector2 a, Vector2 b, Vector2 c, Vector2 d, Vector2 uv_a, Vector2 uv_b, Vector2 uv_c, Vector2 uv_d, uint col) |
|
|
|
|
{ |
|
|
|
|
Vector2 ret = ImGuiNative.ImDrawList_GetClipRectMin(NativePtr); |
|
|
|
|
return ret; |
|
|
|
|
ImGuiNative.ImDrawList_PrimQuadUV(NativePtr, a, b, c, d, uv_a, uv_b, uv_c, uv_d, col); |
|
|
|
|
} |
|
|
|
|
public void PopTextureID() |
|
|
|
|
public void PrimRect(Vector2 a, Vector2 b, uint col) |
|
|
|
|
{ |
|
|
|
|
ImGuiNative.ImDrawList_PopTextureID(NativePtr); |
|
|
|
|
ImGuiNative.ImDrawList_PrimRect(NativePtr, a, b, col); |
|
|
|
|
} |
|
|
|
|
public void PrimWriteVtx(Vector2 pos, Vector2 uv, uint col) |
|
|
|
|
public void PrimRectUV(Vector2 a, Vector2 b, Vector2 uv_a, Vector2 uv_b, uint col) |
|
|
|
|
{ |
|
|
|
|
ImGuiNative.ImDrawList_PrimWriteVtx(NativePtr, pos, uv, col); |
|
|
|
|
ImGuiNative.ImDrawList_PrimRectUV(NativePtr, a, b, uv_a, uv_b, col); |
|
|
|
|
} |
|
|
|
|
public Vector2 GetClipRectMax() |
|
|
|
|
public void PrimReserve(int idx_count, int vtx_count) |
|
|
|
|
{ |
|
|
|
|
Vector2 ret = ImGuiNative.ImDrawList_GetClipRectMax(NativePtr); |
|
|
|
|
return ret; |
|
|
|
|
ImGuiNative.ImDrawList_PrimReserve(NativePtr, idx_count, vtx_count); |
|
|
|
|
} |
|
|
|
|
public void AddImageRounded(IntPtr user_texture_id, Vector2 a, Vector2 b, Vector2 uv_a, Vector2 uv_b, uint col, float rounding) |
|
|
|
|
public void PrimVtx(Vector2 pos, Vector2 uv, uint col) |
|
|
|
|
{ |
|
|
|
|
int rounding_corners = (int)ImDrawCornerFlags.All; |
|
|
|
|
ImGuiNative.ImDrawList_AddImageRounded(NativePtr, user_texture_id, a, b, uv_a, uv_b, col, rounding, rounding_corners); |
|
|
|
|
ImGuiNative.ImDrawList_PrimVtx(NativePtr, pos, uv, col); |
|
|
|
|
} |
|
|
|
|
public void AddImageRounded(IntPtr user_texture_id, Vector2 a, Vector2 b, Vector2 uv_a, Vector2 uv_b, uint col, float rounding, int rounding_corners) |
|
|
|
|
public void PrimWriteIdx(ushort idx) |
|
|
|
|
{ |
|
|
|
|
ImGuiNative.ImDrawList_AddImageRounded(NativePtr, user_texture_id, a, b, uv_a, uv_b, col, rounding, rounding_corners); |
|
|
|
|
ImGuiNative.ImDrawList_PrimWriteIdx(NativePtr, idx); |
|
|
|
|
} |
|
|
|
|
public void PrimQuadUV(Vector2 a, Vector2 b, Vector2 c, Vector2 d, Vector2 uv_a, Vector2 uv_b, Vector2 uv_c, Vector2 uv_d, uint col) |
|
|
|
|
public void PrimWriteVtx(Vector2 pos, Vector2 uv, uint col) |
|
|
|
|
{ |
|
|
|
|
ImGuiNative.ImDrawList_PrimQuadUV(NativePtr, a, b, c, d, uv_a, uv_b, uv_c, uv_d, col); |
|
|
|
|
ImGuiNative.ImDrawList_PrimWriteVtx(NativePtr, pos, uv, col); |
|
|
|
|
} |
|
|
|
|
public void PathClear() |
|
|
|
|
public void PushClipRect(Vector2 clip_rect_min, Vector2 clip_rect_max) |
|
|
|
|
{ |
|
|
|
|
ImGuiNative.ImDrawList_PathClear(NativePtr); |
|
|
|
|
byte intersect_with_current_clip_rect = 0; |
|
|
|
|
ImGuiNative.ImDrawList_PushClipRect(NativePtr, clip_rect_min, clip_rect_max, intersect_with_current_clip_rect); |
|
|
|
|
} |
|
|
|
|
public void PrimWriteIdx(ushort idx) |
|
|
|
|
public void PushClipRect(Vector2 clip_rect_min, Vector2 clip_rect_max, bool intersect_with_current_clip_rect) |
|
|
|
|
{ |
|
|
|
|
ImGuiNative.ImDrawList_PrimWriteIdx(NativePtr, idx); |
|
|
|
|
byte native_intersect_with_current_clip_rect = intersect_with_current_clip_rect ? (byte)1 : (byte)0; |
|
|
|
|
ImGuiNative.ImDrawList_PushClipRect(NativePtr, clip_rect_min, clip_rect_max, native_intersect_with_current_clip_rect); |
|
|
|
|
} |
|
|
|
|
public void PushClipRectFullScreen() |
|
|
|
|
{ |
|
|
|
|
ImGuiNative.ImDrawList_PushClipRectFullScreen(NativePtr); |
|
|
|
|
} |
|
|
|
|
public void ChannelsMerge() |
|
|
|
|
public void PushTextureID(IntPtr texture_id) |
|
|
|
|
{ |
|
|
|
|
ImGuiNative.ImDrawList_ChannelsMerge(NativePtr); |
|
|
|
|
ImGuiNative.ImDrawList_PushTextureID(NativePtr, texture_id); |
|
|
|
|
} |
|
|
|
|
public void PathLineTo(Vector2 pos) |
|
|
|
|
public void UpdateClipRect() |
|
|
|
|
{ |
|
|
|
|
ImGuiNative.ImDrawList_PathLineTo(NativePtr, pos); |
|
|
|
|
ImGuiNative.ImDrawList_UpdateClipRect(NativePtr); |
|
|
|
|
} |
|
|
|
|
public void PrimRectUV(Vector2 a, Vector2 b, Vector2 uv_a, Vector2 uv_b, uint col) |
|
|
|
|
public void UpdateTextureID() |
|
|
|
|
{ |
|
|
|
|
ImGuiNative.ImDrawList_PrimRectUV(NativePtr, a, b, uv_a, uv_b, col); |
|
|
|
|
ImGuiNative.ImDrawList_UpdateTextureID(NativePtr); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|