| 4654 | } |
| 4655 | |
| 4656 | ImU32 SampleColormapU32(float t, ImPlotColormap cmap) { |
| 4657 | ImPlotContext& gp = *GImPlot; |
| 4658 | cmap = cmap == IMPLOT_AUTO ? gp.Style.Colormap : cmap; |
| 4659 | IM_ASSERT_USER_ERROR(cmap >= 0 && cmap < gp.ColormapData.Count, "Invalid colormap index!"); |
| 4660 | return gp.ColormapData.LerpTable(cmap, t); |
| 4661 | } |
| 4662 | |
| 4663 | ImVec4 SampleColormap(float t, ImPlotColormap cmap) { |
| 4664 | return ImGui::ColorConvertU32ToFloat4(SampleColormapU32(t,cmap)); |
no test coverage detected