MCPcopy Create free account
hub / github.com/clementgallet/libTAS / ApplyNextPlotData

Function ApplyNextPlotData

src/external/imgui/implot.cpp:2099–2119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2097//-----------------------------------------------------------------------------
2098
2099void ApplyNextPlotData(ImAxis idx) {
2100 ImPlotContext& gp = *GImPlot;
2101 ImPlotPlot& plot = *gp.CurrentPlot;
2102 ImPlotAxis& axis = plot.Axes[idx];
2103 if (!axis.Enabled)
2104 return;
2105 double* npd_lmin = gp.NextPlotData.LinkedMin[idx];
2106 double* npd_lmax = gp.NextPlotData.LinkedMax[idx];
2107 bool npd_rngh = gp.NextPlotData.HasRange[idx];
2108 ImPlotCond npd_rngc = gp.NextPlotData.RangeCond[idx];
2109 ImPlotRange npd_rngv = gp.NextPlotData.Range[idx];
2110 axis.LinkedMin = npd_lmin;
2111 axis.LinkedMax = npd_lmax;
2112 axis.PullLinks();
2113 if (npd_rngh) {
2114 if (!plot.Initialized || npd_rngc == ImPlotCond_Always)
2115 axis.SetRange(npd_rngv);
2116 }
2117 axis.HasRange = npd_rngh;
2118 axis.RangeCond = npd_rngc;
2119}
2120
2121//-----------------------------------------------------------------------------
2122// Setup

Callers 1

BeginPlotFunction · 0.85

Calls 2

PullLinksMethod · 0.80
SetRangeMethod · 0.80

Tested by

no test coverage detected