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

Function GetPlotLimits

Source/3rdParty/implot/implot.cpp:3789–3802  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3787}
3788
3789ImPlotRect GetPlotLimits(ImAxis x_idx, ImAxis y_idx) {
3790 ImPlotContext& gp = *GImPlot;
3791 IM_ASSERT_USER_ERROR(gp.CurrentPlot != nullptr, "GetPlotLimits() needs to be called between BeginPlot() and EndPlot()!");
3792 IM_ASSERT_USER_ERROR(x_idx == IMPLOT_AUTO || (x_idx >= ImAxis_X1 && x_idx < ImAxis_Y1), "X-Axis index out of bounds!");
3793 IM_ASSERT_USER_ERROR(y_idx == IMPLOT_AUTO || (y_idx >= ImAxis_Y1 && y_idx < ImAxis_COUNT), "Y-Axis index out of bounds!");
3794 SetupLock();
3795 ImPlotPlot& plot = *gp.CurrentPlot;
3796 ImPlotAxis& x_axis = x_idx == IMPLOT_AUTO ? plot.Axes[plot.CurrentX] : plot.Axes[x_idx];
3797 ImPlotAxis& y_axis = y_idx == IMPLOT_AUTO ? plot.Axes[plot.CurrentY] : plot.Axes[y_idx];
3798 ImPlotRect limits;
3799 limits.X = x_axis.Range;
3800 limits.Y = y_axis.Range;
3801 return limits;
3802}
3803
3804bool IsPlotHovered() {
3805 ImPlotContext& gp = *GImPlot;

Callers 5

Demo_TimeScaleFunction · 0.85
Demo_QueryingFunction · 0.85
DragRectFunction · 0.85
PlotShadedFunction · 0.85
PlotInfLinesFunction · 0.85

Calls 1

SetupLockFunction · 0.85

Tested by

no test coverage detected