MCPcopy Create free account
hub / github.com/SatDump/SatDump / GetColormapColorU32

Function GetColormapColorU32

src-core/imgui/implot/implot.cpp:4564–4570  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4562}
4563
4564ImU32 GetColormapColorU32(int idx, ImPlotColormap cmap) {
4565 ImPlotContext& gp = *GImPlot;
4566 cmap = cmap == IMPLOT_AUTO ? gp.Style.Colormap : cmap;
4567 IM_ASSERT_USER_ERROR(cmap >= 0 && cmap < gp.ColormapData.Count, "Invalid colormap index!");
4568 idx = idx % gp.ColormapData.GetKeyCount(cmap);
4569 return gp.ColormapData.GetKeyColor(cmap, idx);
4570}
4571
4572ImVec4 GetColormapColor(int idx, ImPlotColormap cmap) {
4573 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