From 5e3b283f5e71798bd173491796abdfc3c8666e3f Mon Sep 17 00:00:00 2001 From: ozlb Date: Tue, 5 May 2020 08:56:25 +0200 Subject: [PATCH] Update implot.cpp --- implot.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/implot.cpp b/implot.cpp index 06ff1ba..9bd0c58 100644 --- a/implot.cpp +++ b/implot.cpp @@ -2269,6 +2269,8 @@ inline void PlotDigitalEx(const char* label_id, Getter getter, int count, int of } //do not extend plot outside plot range if (pMin.x < gp.PixelRange.Min.x) pMin.x = gp.PixelRange.Min.x; + if (pMax.x < gp.PixelRange.Min.x) pMax.x = gp.PixelRange.Min.x; + if (pMin.x > gp.PixelRange.Max.x) pMin.x = gp.PixelRange.Max.x; if (pMax.x > gp.PixelRange.Max.x) pMax.x = gp.PixelRange.Max.x; //plot a rectangle that extends up to x2 with y1 height if (!cull || gp.BB_Grid.Contains(pMin) || gp.BB_Grid.Contains(pMax)) {