mirror of
https://github.com/gwm17/implot.git
synced 2024-11-22 18:28:53 -05:00
fix scatter plot non-inclusive culling
This commit is contained in:
parent
e966e0d2bc
commit
da1bf57136
|
@ -891,9 +891,10 @@ inline void RenderMarkers(Getter getter, Transformer transformer, ImDrawList& Dr
|
|||
RenderMarkerAsterisk
|
||||
};
|
||||
ImPlotContext& gp = *GImPlot;
|
||||
const ImRect& rect = gp.CurrentPlot->PlotRect;
|
||||
for (int i = 0; i < getter.Count; ++i) {
|
||||
ImVec2 c = transformer(getter(i));
|
||||
if (gp.CurrentPlot->PlotRect.Contains(c))
|
||||
if (c.x >= rect.Min.x && c.y >= rect.Min.y && c.x <= rect.Max.x && c.y <= rect.Max.y)
|
||||
marker_table[marker](DrawList, c, size, rend_mk_line, col_mk_line, rend_mk_fill, col_mk_fill, weight);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user