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

Function PlotToPixels

src/external/imgui/implot.cpp:3684–3694  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3682}
3683
3684ImVec2 PlotToPixels(double x, double y, ImAxis x_idx, ImAxis y_idx) {
3685 ImPlotContext& gp = *GImPlot;
3686 IM_ASSERT_USER_ERROR(gp.CurrentPlot != nullptr, "PlotToPixels() needs to be called between BeginPlot() and EndPlot()!");
3687 IM_ASSERT_USER_ERROR(x_idx == IMPLOT_AUTO || (x_idx >= ImAxis_X1 && x_idx < ImAxis_Y1), "X-Axis index out of bounds!");
3688 IM_ASSERT_USER_ERROR(y_idx == IMPLOT_AUTO || (y_idx >= ImAxis_Y1 && y_idx < ImAxis_COUNT), "Y-Axis index out of bounds!");
3689 SetupLock();
3690 ImPlotPlot& plot = *gp.CurrentPlot;
3691 ImPlotAxis& x_axis = x_idx == IMPLOT_AUTO ? plot.Axes[plot.CurrentX] : plot.Axes[x_idx];
3692 ImPlotAxis& y_axis = y_idx == IMPLOT_AUTO ? plot.Axes[plot.CurrentY] : plot.Axes[y_idx];
3693 return ImVec2( x_axis.PlotToPixels(x), y_axis.PlotToPixels(y) );
3694}
3695
3696ImVec2 PlotToPixels(const ImPlotPoint& plt, ImAxis x_idx, ImAxis y_idx) {
3697 return PlotToPixels(plt.x, plt.y, x_idx, y_idx);

Callers 12

AnnotationVFunction · 0.85
DragPointFunction · 0.85
DragLineXFunction · 0.85
DragLineYFunction · 0.85
DragRectFunction · 0.85
PlotErrorBarsVExFunction · 0.85
PlotErrorBarsHExFunction · 0.85
RenderPieSliceFunction · 0.85
PlotPieChartFunction · 0.85
PlotDigitalExFunction · 0.85
PlotImageFunction · 0.85
PlotTextFunction · 0.85

Calls 3

SetupLockFunction · 0.85
ImVec2Function · 0.85
PlotToPixelsMethod · 0.80

Tested by

no test coverage detected