Skip to content

Commit 5fc32e8

Browse files
committed
Add ImFont helper methods to get ImVec2 values
1 parent 8cdb72b commit 5fc32e8

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,20 @@ public ImFontGlyph getFallbackGlyph() {
9797
Jni::ImVec2Cpy(env, &IM_FONT->DisplayOffset, dstImVec2);
9898
*/
9999

100+
/**
101+
* Offset font rendering by xx pixels
102+
*/
103+
public native float getDisplayOffsetX(); /*
104+
return IM_FONT->DisplayOffset.x;
105+
*/
106+
107+
/**
108+
* Offset font rendering by xx pixels
109+
*/
110+
public native float getDisplayOffsetY(); /*
111+
return IM_FONT->DisplayOffset.y;
112+
*/
113+
100114
/**
101115
* Offset font rendering by xx pixels
102116
*/

0 commit comments

Comments
 (0)