| 3797 | //----------------------------------------------------------------------------- |
| 3798 | |
| 3799 | void 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 | |
| 3812 | void AnnotationV(double x, double y, const ImVec4& col, const ImVec2& offset, bool clamp, const char* fmt, va_list args) { |
| 3813 | ImPlotContext& gp = *GImPlot; |
nothing calls this directly
no test coverage detected