Skip to content

Commit f013696

Browse files
committed
Add ImFontConfig helper methods to get ImVec2 values
1 parent 5fc32e8 commit f013696

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

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

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,20 @@ public void destroy() {
181181
Jni::ImVec2Cpy(env, &IM_FONT_CONFIG->GlyphExtraSpacing, dstImVec2);
182182
*/
183183

184+
/**
185+
* Extra spacing (in pixels) between glyphs. Only X axis is supported for now.
186+
*/
187+
public native float getGlyphExtraSpacingX(); /*
188+
return IM_FONT_CONFIG->GlyphExtraSpacing.x;
189+
*/
190+
191+
/**
192+
* Extra spacing (in pixels) between glyphs. Only X axis is supported for now.
193+
*/
194+
public native float getGlyphExtraSpacingY(); /*
195+
return IM_FONT_CONFIG->GlyphExtraSpacing.y;
196+
*/
197+
184198
/**
185199
* Extra spacing (in pixels) between glyphs. Only X axis is supported for now.
186200
*/
@@ -196,6 +210,20 @@ public void destroy() {
196210
Jni::ImVec2Cpy(env, &IM_FONT_CONFIG->GlyphOffset, dstImVec2);
197211
*/
198212

213+
/**
214+
* Offset all glyphs from this font input.
215+
*/
216+
public native float getGlyphOffsetX(); /*
217+
return IM_FONT_CONFIG->GlyphOffset.x;
218+
*/
219+
220+
/**
221+
* Offset all glyphs from this font input.
222+
*/
223+
public native float getGlyphOffsetY(); /*
224+
return IM_FONT_CONFIG->GlyphOffset.y;
225+
*/
226+
199227
/**
200228
* Offset all glyphs from this font input.
201229
*/

0 commit comments

Comments
 (0)