@@ -16,6 +16,7 @@ public final class ImDrawList {
16
16
public static final int TYPE_BACKGROUND = 1 ;
17
17
public static final int TYPE_FOREGROUND = 2 ;
18
18
19
+ @ SuppressWarnings ({"FieldCanBeLocal" , "unused" })
19
20
private final int drawListType ;
20
21
21
22
ImDrawList (final int drawListType ) {
@@ -60,6 +61,48 @@ public final class ImDrawList {
60
61
getDrawList(env->GetIntField(object, drawListTypeID))->Flags = imDrawListFlags;
61
62
*/
62
63
64
+ /**
65
+ * Render-level scissoring.
66
+ * This is passed down to your render function but not used for CPU-side coarse clipping.
67
+ * Prefer using higher-level ImGui::PushClipRect() to affect logic (hit-testing and widget culling)
68
+ */
69
+ public native void pushClipRect (float clipRectMinX , float clipRectMinY , float clipRectMaxX , float clipRectMaxY ); /*
70
+ getDrawList(env->GetIntField(object, drawListTypeID))->PushClipRect(ImVec2(clipRectMinX, clipRectMinY), ImVec2(clipRectMaxX, clipRectMaxY));
71
+ */
72
+
73
+ /**
74
+ * Render-level scissoring.
75
+ * This is passed down to your render function but not used for CPU-side coarse clipping.
76
+ * Prefer using higher-level ImGui::PushClipRect() to affect logic (hit-testing and widget culling)
77
+ */
78
+ public native void pushClipRect (float clipRectMinX , float clipRectMinY , float clipRectMaxX , float clipRectMaxY , boolean intersectWithCurrentClipRect ); /*
79
+ getDrawList(env->GetIntField(object, drawListTypeID))->PushClipRect(ImVec2(clipRectMinX, clipRectMinY), ImVec2(clipRectMaxX, clipRectMaxY), intersectWithCurrentClipRect);
80
+ */
81
+
82
+ public native void pushClipRectFullScreen (); /*
83
+ getDrawList(env->GetIntField(object, drawListTypeID))->PushClipRectFullScreen();
84
+ */
85
+
86
+ public native void popClipRect (); /*
87
+ getDrawList(env->GetIntField(object, drawListTypeID))->PopClipRect();
88
+ */
89
+
90
+ public native void pushTextureId (int textureId ); /*
91
+ getDrawList(env->GetIntField(object, drawListTypeID))->PushTextureID((ImTextureID)textureId);
92
+ */
93
+
94
+ public native void popTextureId (); /*
95
+ getDrawList(env->GetIntField(object, drawListTypeID))->PopTextureID();
96
+ */
97
+
98
+ public native void getClipRectMin (ImVec2 dstImVec2 ); /*
99
+ Jni::ImVec2Cpy(env, getDrawList(env->GetIntField(object, drawListTypeID))->GetClipRectMin(), dstImVec2);
100
+ */
101
+
102
+ public native void getClipRectMax (ImVec2 dstImVec2 ); /*
103
+ Jni::ImVec2Cpy(env, getDrawList(env->GetIntField(object, drawListTypeID))->GetClipRectMax(), dstImVec2);
104
+ */
105
+
63
106
// Primitives
64
107
// - For rectangular primitives, "pMin" and "pMax" represent the upper-left and lower-right corners.
65
108
0 commit comments