[API] Add API to directly return ImVec2/ImVec4
This commit is contained in:
1 parent
d285bbfb34
commit
36415d60f3
12 files changed
+553
-1
No files matched your search
@@ -53,6 +53,15 @@ public final class ImDrawData extends ImGuiStruct {
|
||||
return IM_DRAW_DATA->CmdLists[cmdListIdx]->CmdBuffer[cmdBufferIdx].ElemCount;
|
||||
*/
|
||||
|
||||
/**
|
||||
* Clipping rectangle (x1, y1, x2, y2). Subtract ImDrawData.DisplayPos to get clipping rectangle in "viewport" coordinates
|
||||
*/
|
||||
public ImVec4 getCmdListCmdBufferClipRect(final int cmdListIdx, final int cmdBufferIdx) {
|
||||
final ImVec4 value = new ImVec4();
|
||||
getCmdListCmdBufferClipRect(cmdListIdx, cmdBufferIdx, value);
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clipping rectangle (x1, y1, x2, y2). Subtract ImDrawData.DisplayPos to get clipping rectangle in "viewport" coordinates
|
||||
*/
|
||||
@@ -165,6 +174,15 @@ public final class ImDrawData extends ImGuiStruct {
|
||||
return IM_DRAW_DATA->TotalVtxCount;
|
||||
*/
|
||||
|
||||
/**
|
||||
* Upper-left position of the viewport to render (== upper-left of the orthogonal projection matrix to use)
|
||||
*/
|
||||
public ImVec2 getDisplayPos() {
|
||||
final ImVec2 value = new ImVec2();
|
||||
getDisplayPos(value);
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Upper-left position of the viewport to render (== upper-left of the orthogonal projection matrix to use)
|
||||
*/
|
||||
@@ -186,6 +204,16 @@ public final class ImDrawData extends ImGuiStruct {
|
||||
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)
|
||||
*/
|
||||
public ImVec2 getDisplaySize() {
|
||||
final ImVec2 value = new ImVec2();
|
||||
getDisplaySize(value);
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Size of the viewport to render (== io.DisplaySize for the main viewport)
|
||||
* (DisplayPos + DisplaySize == lower-right of the orthogonal projection matrix to use)
|
||||
@@ -210,6 +238,15 @@ public final class ImDrawData extends ImGuiStruct {
|
||||
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.
|
||||
*/
|
||||
public ImVec2 getFramebufferScale() {
|
||||
final ImVec2 value = new ImVec2();
|
||||
getFramebufferScale(value);
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user