From 761405e2a7234e378d6d4d34b8682a6405de315c Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 16 Jun 2019 16:23:24 +0200 Subject: [PATCH] Clip histogram highlight to graph area. --- server/TracyView.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index c3b4bfde..90eaef26 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -6820,8 +6820,10 @@ void View::DrawFindZone() t1 = ( e - tmin ) / float( tmax - tmin ) * numBins; } + draw->PushClipRect( wpos, wpos + ImVec2( w, Height ), true ); draw->AddRectFilled( wpos + ImVec2( 2 + t0, 1 ), wpos + ImVec2( 2 + t1, Height-1 ), 0x22DD8888 ); draw->AddRect( wpos + ImVec2( 2 + t0, 1 ), wpos + ImVec2( 2 + t1, Height-1 ), 0x44DD8888 ); + draw->PopClipRect(); } } }