Skip to content

Commit 8cdb72b

Browse files
committed
Add ImDrawList helper methods to get ImVec2 values
1 parent 8e604fd commit 8cdb72b

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

imgui-binding/src/main/java/imgui/ImDrawList.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,26 @@ public final class ImDrawList {
8585
Jni::ImVec2Cpy(env, IM_DRAW_LIST->GetClipRectMin(), dstImVec2);
8686
*/
8787

88+
public native float getClipRectMinX(); /*
89+
return IM_DRAW_LIST->GetClipRectMin().x;
90+
*/
91+
92+
public native float getClipRectMinY(); /*
93+
return IM_DRAW_LIST->GetClipRectMin().y;
94+
*/
95+
8896
public native void getClipRectMax(ImVec2 dstImVec2); /*
8997
Jni::ImVec2Cpy(env, IM_DRAW_LIST->GetClipRectMax(), dstImVec2);
9098
*/
9199

100+
public native float getClipRectMaxX(); /*
101+
return IM_DRAW_LIST->GetClipRectMax().x;
102+
*/
103+
104+
public native float getClipRectMaxY(); /*
105+
return IM_DRAW_LIST->GetClipRectMax().y;
106+
*/
107+
92108
// Primitives
93109
// - For rectangular primitives, "pMin" and "pMax" represent the upper-left and lower-right corners.
94110
// - For circle primitives, use "num_segments == 0" to automatically calculate tessellation (preferred).

0 commit comments

Comments
 (0)