ImRect: added AsVec4() helper. Using ImRect in InputTextEx().

This commit is contained in:
ocornut
2025-08-27 21:43:25 +02:00
parent 6351f00ff1
commit 771fae623d
2 changed files with 6 additions and 5 deletions
+1
View File
@@ -592,6 +592,7 @@ struct IMGUI_API ImRect
void Floor() { Min.x = IM_TRUNC(Min.x); Min.y = IM_TRUNC(Min.y); Max.x = IM_TRUNC(Max.x); Max.y = IM_TRUNC(Max.y); }
bool IsInverted() const { return Min.x > Max.x || Min.y > Max.y; }
ImVec4 ToVec4() const { return ImVec4(Min.x, Min.y, Max.x, Max.y); }
const ImVec4& AsVec4() const { return *(const ImVec4*)&Min.x; }
};
// Helper: ImBitArray