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

Function SetAxes

Source/3rdParty/implot/implot.cpp:3725–3735  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3723}
3724
3725void SetAxes(ImAxis x_idx, ImAxis y_idx) {
3726 ImPlotContext& gp = *GImPlot;
3727 IM_ASSERT_USER_ERROR(gp.CurrentPlot != nullptr, "SetAxes() needs to be called between BeginPlot() and EndPlot()!");
3728 IM_ASSERT_USER_ERROR(x_idx >= ImAxis_X1 && x_idx < ImAxis_Y1, "X-Axis index out of bounds!");
3729 IM_ASSERT_USER_ERROR(y_idx >= ImAxis_Y1 && y_idx < ImAxis_COUNT, "Y-Axis index out of bounds!");
3730 IM_ASSERT_USER_ERROR(gp.CurrentPlot->Axes[x_idx].Enabled, "Axis is not enabled! Did you forget to call SetupAxis()?");
3731 IM_ASSERT_USER_ERROR(gp.CurrentPlot->Axes[y_idx].Enabled, "Axis is not enabled! Did you forget to call SetupAxis()?");
3732 SetupLock();
3733 gp.CurrentPlot->CurrentX = x_idx;
3734 gp.CurrentPlot->CurrentY = y_idx;
3735}
3736
3737ImPlotPoint PixelsToPlot(float x, float y, ImAxis x_idx, ImAxis y_idx) {
3738 ImPlotContext& gp = *GImPlot;

Callers 3

Demo_MultipleAxesFunction · 0.85
Demo_EqualAxesFunction · 0.85
Demo_TagsFunction · 0.85

Calls 1

SetupLockFunction · 0.85

Tested by

no test coverage detected