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

Function Annotation

src/external/imgui/implot.cpp:3799–3810  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3797//-----------------------------------------------------------------------------
3798
3799void Annotation(double x, double y, const ImVec4& col, const ImVec2& offset, bool clamp, bool round) {
3800 ImPlotContext& gp = *GImPlot;
3801 IM_ASSERT_USER_ERROR(gp.CurrentPlot != nullptr, "Annotation() needs to be called between BeginPlot() and EndPlot()!");
3802 SetupLock();
3803 char x_buff[IMPLOT_LABEL_MAX_SIZE];
3804 char y_buff[IMPLOT_LABEL_MAX_SIZE];
3805 ImPlotAxis& x_axis = gp.CurrentPlot->Axes[gp.CurrentPlot->CurrentX];
3806 ImPlotAxis& y_axis = gp.CurrentPlot->Axes[gp.CurrentPlot->CurrentY];
3807 LabelAxisValue(x_axis, x, x_buff, sizeof(x_buff), round);
3808 LabelAxisValue(y_axis, y, y_buff, sizeof(y_buff), round);
3809 Annotation(x,y,col,offset,clamp,"%s, %s",x_buff,y_buff);
3810}
3811
3812void AnnotationV(double x, double y, const ImVec4& col, const ImVec2& offset, bool clamp, const char* fmt, va_list args) {
3813 ImPlotContext& gp = *GImPlot;

Callers

nothing calls this directly

Calls 3

SetupLockFunction · 0.85
LabelAxisValueFunction · 0.85
AnnotationVFunction · 0.85

Tested by

no test coverage detected