Add ImDrawData helper methods to get ImVec2 values

This commit is contained in:
SpaiR committed 2020-07-09 13:28:29 +03:00
1 parent fc8f0b0a2f
commit 8e604fd802
1 file changed
+44
@@ -184,6 +184,20 @@ public final class ImDrawData implements ImGuiDestroyableStruct {
Jni::ImVec2Cpy(env, &IM_DRAW_DATA->DisplayPos, dstImVec2);
*/
/**
* Upper-left position of the viewport to render (== upper-left of the orthogonal projection matrix to use)
*/
public native float getDisplayPosX(); /*
return IM_DRAW_DATA->DisplayPos.x;
*/
/**
* Upper-left position of the viewport to render (== upper-left of the orthogonal projection matrix to use)
*/
public native float getDisplayPosY(); /*
return IM_DRAW_DATA->DisplayPos.y;
*/
/**
* Size of the viewport to render (== io.DisplaySize for the main viewport)
* (DisplayPos + DisplaySize == lower-right of the orthogonal projection matrix to use)
@@ -192,6 +206,22 @@ public final class ImDrawData implements ImGuiDestroyableStruct {
Jni::ImVec2Cpy(env, &IM_DRAW_DATA->DisplaySize, dstImVec2);
*/
/**
* Size of the viewport to render (== io.DisplaySize for the main viewport)
* (DisplayPos + DisplaySize == lower-right of the orthogonal projection matrix to use)
*/
public native float getDisplaySizeX(); /*
return IM_DRAW_DATA->DisplaySize.x;
*/
/**
* Size of the viewport to render (== io.DisplaySize for the main viewport)
* (DisplayPos + DisplaySize == lower-right of the orthogonal projection matrix to use)
*/
public native float getDisplaySizeY(); /*
return IM_DRAW_DATA->DisplaySize.y;
*/
/**
* Amount of pixels for each unit of DisplaySize. Based on io.DisplayFramebufferScale. Generally (1,1) on normal display, (2,2) on OSX with Retina display.
*/
@@ -199,6 +229,20 @@ public final class ImDrawData implements ImGuiDestroyableStruct {
Jni::ImVec2Cpy(env, &IM_DRAW_DATA->FramebufferScale, dstImVec2);
*/
/**
* Amount of pixels for each unit of DisplaySize. Based on io.DisplayFramebufferScale. Generally (1,1) on normal display, (2,2) on OSX with Retina display.
*/
public native float getFramebufferScaleX(); /*
return IM_DRAW_DATA->FramebufferScale.x;
*/
/**
* Amount of pixels for each unit of DisplaySize. Based on io.DisplayFramebufferScale. Generally (1,1) on normal display, (2,2) on OSX with Retina display.
*/
public native float getFramebufferScaleY(); /*
return IM_DRAW_DATA->FramebufferScale.y;
*/
// Functions
/**