From e4a067efe654a958ce3013ac9b6397951a3d1c71 Mon Sep 17 00:00:00 2001 From: Dario Manesku Date: Tue, 12 Aug 2014 19:49:06 +0100 Subject: [PATCH] Fixing border pixel scissor. --- examples/common/imgui/imgui.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/common/imgui/imgui.cpp b/examples/common/imgui/imgui.cpp index df4d6070..87e3388e 100644 --- a/examples/common/imgui/imgui.cpp +++ b/examples/common/imgui/imgui.cpp @@ -716,21 +716,21 @@ struct Imgui } const int32_t contentX = _x + SCROLL_AREA_PADDING; - const int32_t contentY = _y + SCROLL_AREA_PADDING + header - 1; + const int32_t contentY = _y + SCROLL_AREA_PADDING + header; const int32_t contentWidth = _width - SCROLL_AREA_PADDING * 3; - const int32_t contentHeight = _height - 2*SCROLL_AREA_PADDING - header + 1; + const int32_t contentHeight = _height - 2*SCROLL_AREA_PADDING - header; nvgScissor(m_nvg , float(contentX) - , float(contentY) + , float(contentY-1) , float(contentWidth) - , float(contentHeight) + , float(contentHeight+1) ); m_scissor = bgfx::setScissor(uint16_t(contentX) - , uint16_t(contentY) + , uint16_t(contentY-1) , uint16_t(contentWidth) - , uint16_t(contentHeight) + , uint16_t(contentHeight+1) ); m_widgetX = contentX;