| 2006 | |
| 2007 | template <typename Getter> |
| 2008 | void PlotScatterEx(const char* label_id, const Getter& getter, const ImPlotSpec& spec) { |
| 2009 | // force scatter to render a marker even if none |
| 2010 | ImPlotMarker marker = spec.Marker == ImPlotMarker_None ? ImPlotMarker_Auto: spec.Marker; |
| 2011 | if (BeginItemEx(label_id, Fitter1<Getter>(getter), spec, spec.LineColor, marker)) { |
| 2012 | if (getter.Count <= 0) { |
| 2013 | EndItem(); |
| 2014 | return; |
| 2015 | } |
| 2016 | const ImPlotNextItemData& s = GetItemData(); |
| 2017 | if (s.RenderMarkers) { |
| 2018 | if (ImHasFlag(spec.Flags,ImPlotScatterFlags_NoClip)) { |
| 2019 | PopPlotClipRect(); |
| 2020 | PushPlotClipRect(s.Spec.MarkerSize); |
| 2021 | } |
| 2022 | RenderColoredMarkers(getter, s); |
| 2023 | } |
| 2024 | EndItem(); |
| 2025 | } |
| 2026 | } |
| 2027 | |
| 2028 | template <typename T> |
| 2029 | void PlotScatter(const char* label_id, const T* values, int count, double xscale, double x0, const ImPlotSpec& spec) { |
no test coverage detected