MCPcopy Create free account
hub / github.com/clementgallet/libTAS / SampleColormapU32

Function SampleColormapU32

src/external/imgui/implot.cpp:4576–4581  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4574}
4575
4576ImU32 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
4583ImVec4 SampleColormap(float t, ImPlotColormap cmap) {
4584 return ImGui::ColorConvertU32ToFloat4(SampleColormapU32(t,cmap));

Callers 1

SampleColormapFunction · 0.85

Calls 1

LerpTableMethod · 0.80

Tested by

no test coverage detected