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

Function PlotToPixels

Source/3rdParty/implot/implot.cpp:3753–3763  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3751}
3752
3753ImVec2 PlotToPixels(double x, double y, ImAxis x_idx, ImAxis y_idx) {
3754 ImPlotContext& gp = *GImPlot;
3755 IM_ASSERT_USER_ERROR(gp.CurrentPlot != nullptr, "PlotToPixels() needs to be called between BeginPlot() and EndPlot()!");
3756 IM_ASSERT_USER_ERROR(x_idx == IMPLOT_AUTO || (x_idx >= ImAxis_X1 && x_idx < ImAxis_Y1), "X-Axis index out of bounds!");
3757 IM_ASSERT_USER_ERROR(y_idx == IMPLOT_AUTO || (y_idx >= ImAxis_Y1 && y_idx < ImAxis_COUNT), "Y-Axis index out of bounds!");
3758 SetupLock();
3759 ImPlotPlot& plot = *gp.CurrentPlot;
3760 ImPlotAxis& x_axis = x_idx == IMPLOT_AUTO ? plot.Axes[plot.CurrentX] : plot.Axes[x_idx];
3761 ImPlotAxis& y_axis = y_idx == IMPLOT_AUTO ? plot.Axes[plot.CurrentY] : plot.Axes[y_idx];
3762 return ImVec2( x_axis.PlotToPixels(x), y_axis.PlotToPixels(y) );
3763}
3764
3765ImVec2 PlotToPixels(const ImPlotPoint& plt, ImAxis x_idx, ImAxis y_idx) {
3766 return PlotToPixels(plt.x, plt.y, x_idx, y_idx);

Callers 14

Demo_CustomRenderingFunction · 0.85
PlotCandlestickFunction · 0.85
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

Calls 3

SetupLockFunction · 0.85
ImVec2Function · 0.85
PlotToPixelsMethod · 0.80

Tested by

no test coverage detected