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

Function SetupAxisZoomConstraints

Source/3rdParty/implot/implot.cpp:2335–2344  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2333}
2334
2335void SetupAxisZoomConstraints(ImAxis idx, double z_min, double z_max) {
2336 ImPlotContext& gp = *GImPlot;
2337 IM_ASSERT_USER_ERROR(gp.CurrentPlot != nullptr && !gp.CurrentPlot->SetupLocked,
2338 "Setup needs to be called after BeginPlot and before any setup locking functions (e.g. PlotX)!");
2339 ImPlotPlot& plot = *gp.CurrentPlot;
2340 ImPlotAxis& axis = plot.Axes[idx];
2341 IM_ASSERT_USER_ERROR(axis.Enabled, "Axis is not enabled! Did you forget to call SetupAxis()?");
2342 axis.ConstraintZoom.Min = z_min;
2343 axis.ConstraintZoom.Max = z_max;
2344}
2345
2346void SetupAxes(const char* x_label, const char* y_label, ImPlotAxisFlags x_flags, ImPlotAxisFlags y_flags) {
2347 SetupAxis(ImAxis_X1, x_label, x_flags);

Callers 2

Demo_AxisConstraintsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected