MCPcopy Create free account
hub / github.com/IppClub/Dora-SSR / SampleColormapU32

Function SampleColormapU32

Source/3rdParty/implot/implot.cpp:4656–4661  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4654}
4655
4656ImU32 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
4663ImVec4 SampleColormap(float t, ImPlotColormap cmap) {
4664 return ImGui::ColorConvertU32ToFloat4(SampleColormapU32(t,cmap));

Callers 1

SampleColormapFunction · 0.85

Calls 1

LerpTableMethod · 0.80

Tested by

no test coverage detected