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

Function GetColormapColorU32

Source/3rdParty/implot/implot.cpp:4644–4650  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4642}
4643
4644ImU32 GetColormapColorU32(int idx, ImPlotColormap cmap) {
4645 ImPlotContext& gp = *GImPlot;
4646 cmap = cmap == IMPLOT_AUTO ? gp.Style.Colormap : cmap;
4647 IM_ASSERT_USER_ERROR(cmap >= 0 && cmap < gp.ColormapData.Count, "Invalid colormap index!");
4648 idx = idx % gp.ColormapData.GetKeyCount(cmap);
4649 return gp.ColormapData.GetKeyColor(cmap, idx);
4650}
4651
4652ImVec4 GetColormapColor(int idx, ImPlotColormap cmap) {
4653 return ImGui::ColorConvertU32ToFloat4(GetColormapColorU32(idx,cmap));

Callers 3

GetColormapColorFunction · 0.85
ShowStyleEditorFunction · 0.85
RenderHeatmapFunction · 0.85

Calls 2

GetKeyCountMethod · 0.80
GetKeyColorMethod · 0.80

Tested by

no test coverage detected