MCPcopy Create free account
hub / github.com/brenocq/implot3d / NextColormapColorU32

Function NextColormapColorU32

implot3d.cpp:3212–3219  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3210}
3211
3212ImU32 NextColormapColorU32() {
3213 ImPlot3DContext& gp = *GImPlot3D;
3214 IM_ASSERT_USER_ERROR(gp.CurrentItems != nullptr, "NextColormapColor() needs to be called between BeginPlot() and EndPlot()!");
3215 int idx = gp.CurrentItems->ColormapIdx % gp.ColormapData.GetKeyCount(gp.Style.Colormap);
3216 ImU32 col = gp.ColormapData.GetKeyColor(gp.Style.Colormap, idx);
3217 gp.CurrentItems->ColormapIdx++;
3218 return col;
3219}
3220
3221ImVec4 NextColormapColor() { return ImGui::ColorConvertU32ToFloat4(NextColormapColorU32()); }
3222

Callers 2

NextColormapColorFunction · 0.85
BeginItemFunction · 0.85

Calls 2

GetKeyCountMethod · 0.80
GetKeyColorMethod · 0.80

Tested by

no test coverage detected