| 3866 | //----------------------------------------------------------------------------- |
| 3867 | |
| 3868 | void 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 | |
| 3881 | void AnnotationV(double x, double y, const ImVec4& col, const ImVec2& offset, bool clamp, const char* fmt, va_list args) { |
| 3882 | ImPlotContext& gp = *GImPlot; |
no test coverage detected