1
0
mirror of https://github.com/ocornut/imgui.git synced 2024-11-12 02:00:58 +01:00

ImDrawList: Added GetClipRectMin(), GetClipRectMax() helpers. Comments.

This commit is contained in:
omar 2017-08-20 23:45:02 +08:00
parent 067127f113
commit 9b484d24cd
2 changed files with 3 additions and 1 deletions

View File

@ -26,7 +26,7 @@ It's mostly a bunch of personal notes, probably incomplete. Feel free to query i
- window: expose contents size. (#1045)
- window: GetWindowSize() returns (0,0) when not calculated? (#1045)
!- scrolling: allow immediately effective change of scroll after Begin() if we haven't appended items yet.
- scrolling/clipping: separator on the initial position of a window is not visible (cursorpos.y <= clippos.y)
- scrolling/clipping: separator on the initial position of a window is not visible (cursorpos.y <= clippos.y). (2017-08-20: can't repro)
- drawlist: move Font, FontSize, FontTexUvWhitePixel inside ImDrawList and make it self-contained (apart from drawing settings?)
- drawlist: make it easier to toggle AA per primitive, so we can use e.g. non-AA fill + AA borders more naturally

View File

@ -1233,6 +1233,8 @@ struct ImDrawList
IMGUI_API void PopClipRect();
IMGUI_API void PushTextureID(const ImTextureID& texture_id);
IMGUI_API void PopTextureID();
inline ImVec2 GetClipRectMin() const { const ImVec4& cr = _ClipRectStack.back(); return ImVec2(cr.x, cr.y); }
inline ImVec2 GetClipRectMax() const { const ImVec4& cr = _ClipRectStack.back(); return ImVec2(cr.z, cr.w); }
// Primitives
IMGUI_API void AddLine(const ImVec2& a, const ImVec2& b, ImU32 col, float thickness = 1.0f);