MCPcopy Create free account
hub / github.com/IppClub/Dora-SSR / PlotStemsEx

Function PlotStemsEx

Source/3rdParty/implot/implot_items.cpp:2630–2656  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2628
2629template <typename _GetterM, typename _GetterB>
2630void PlotStemsEx(const char* label_id, const _GetterM& getter_mark, const _GetterB& getter_base, const ImPlotSpec& spec) {
2631 if (BeginItemEx(label_id, Fitter2<_GetterM,_GetterB>(getter_mark,getter_base), spec, spec.LineColor, spec.Marker)) {
2632 if (getter_mark.Count <= 0 || getter_base.Count <= 0) {
2633 EndItem();
2634 return;
2635 }
2636 const ImPlotNextItemData& s = GetItemData();
2637 // render stems
2638 if (s.RenderLine) {
2639 const ImU32 col_line = ImGui::GetColorU32(s.Spec.LineColor);
2640 if (s.Spec.LineColors != nullptr) {
2641 GetterIdxColor color_getter(s.Spec.LineColors, getter_mark.Count);
2642 RenderPrimitives3<RendererLineSegments2>(getter_mark, getter_base, color_getter, s.Spec.LineWeight);
2643 } else {
2644 GetterConstColor color_getter(col_line);
2645 RenderPrimitives3<RendererLineSegments2>(getter_mark, getter_base, color_getter, s.Spec.LineWeight);
2646 }
2647 }
2648 // render markers
2649 if (s.RenderMarkers) {
2650 PopPlotClipRect();
2651 PushPlotClipRect(s.Spec.MarkerSize);
2652 RenderColoredMarkers(getter_mark, s);
2653 }
2654 EndItem();
2655 }
2656}
2657
2658template <typename T>
2659void PlotStems(const char* label_id, const T* values, int count, double ref, double scale, double start, const ImPlotSpec& spec) {

Callers 1

PlotStemsFunction · 0.85

Calls 5

BeginItemExFunction · 0.85
EndItemFunction · 0.85
PopPlotClipRectFunction · 0.85
PushPlotClipRectFunction · 0.85
RenderColoredMarkersFunction · 0.85

Tested by

no test coverage detected