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

Function Annotation

Source/3rdParty/implot/implot.cpp:3868–3879  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3866//-----------------------------------------------------------------------------
3867
3868void Annotation(double x, double y, const ImVec4& col, const ImVec2& offset, bool clamp, bool round) {
3869 ImPlotContext& gp = *GImPlot;
3870 IM_ASSERT_USER_ERROR(gp.CurrentPlot != nullptr, "Annotation() needs to be called between BeginPlot() and EndPlot()!");
3871 SetupLock();
3872 char x_buff[IMPLOT_LABEL_MAX_SIZE];
3873 char y_buff[IMPLOT_LABEL_MAX_SIZE];
3874 ImPlotAxis& x_axis = gp.CurrentPlot->Axes[gp.CurrentPlot->CurrentX];
3875 ImPlotAxis& y_axis = gp.CurrentPlot->Axes[gp.CurrentPlot->CurrentY];
3876 LabelAxisValue(x_axis, x, x_buff, sizeof(x_buff), round);
3877 LabelAxisValue(y_axis, y, y_buff, sizeof(y_buff), round);
3878 Annotation(x,y,col,offset,clamp,"%s, %s",x_buff,y_buff);
3879}
3880
3881void AnnotationV(double x, double y, const ImVec4& col, const ImVec2& offset, bool clamp, const char* fmt, va_list args) {
3882 ImPlotContext& gp = *GImPlot;

Callers 2

Demo_TimeScaleFunction · 0.70
Demo_AnnotationsFunction · 0.70

Calls 3

SetupLockFunction · 0.85
LabelAxisValueFunction · 0.85
AnnotationVFunction · 0.85

Tested by

no test coverage detected