| 4574 | } |
| 4575 | |
| 4576 | ImU32 SampleColormapU32(float t, ImPlotColormap cmap) { |
| 4577 | ImPlotContext& gp = *GImPlot; |
| 4578 | cmap = cmap == IMPLOT_AUTO ? gp.Style.Colormap : cmap; |
| 4579 | IM_ASSERT_USER_ERROR(cmap >= 0 && cmap < gp.ColormapData.Count, "Invalid colormap index!"); |
| 4580 | return gp.ColormapData.LerpTable(cmap, t); |
| 4581 | } |
| 4582 | |
| 4583 | ImVec4 SampleColormap(float t, ImPlotColormap cmap) { |
| 4584 | return ImGui::ColorConvertU32ToFloat4(SampleColormapU32(t,cmap)); |
no test coverage detected