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

Function PlotHeatmap

Source/3rdParty/implot/implot_items.cpp:3169–3181  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3167
3168template <typename T>
3169void PlotHeatmap(const char* label_id, const T* values, int rows, int cols, double scale_min, double scale_max, const char* fmt, const ImPlotPoint& bounds_min, const ImPlotPoint& bounds_max, const ImPlotSpec& spec) {
3170 if (BeginItemEx(label_id, FitterRect(bounds_min, bounds_max), spec)) {
3171 if (rows <= 0 || cols <= 0) {
3172 EndItem();
3173 return;
3174 }
3175 ImDrawList& draw_list = *GetPlotDrawList();
3176 const bool col_maj = ImHasFlag(spec.Flags, ImPlotHeatmapFlags_ColMajor);
3177 IndexerIdx<T> indexer(values,rows*cols,spec.Offset,Stride<T>(spec));
3178 RenderHeatmap(draw_list, indexer, rows, cols, scale_min, scale_max, fmt, bounds_min, bounds_max, true, col_maj);
3179 EndItem();
3180 }
3181}
3182#define INSTANTIATE_MACRO(T) template IMPLOT_API void PlotHeatmap<T>(const char* label_id, const T* values, int rows, int cols, double scale_min, double scale_max, const char* fmt, const ImPlotPoint& bounds_min, const ImPlotPoint& bounds_max, const ImPlotSpec& spec);
3183CALL_INSTANTIATE_FOR_NUMERIC_TYPES()
3184#undef INSTANTIATE_MACRO

Callers 1

Demo_HeatmapsFunction · 0.85

Calls 6

BeginItemExFunction · 0.85
FitterRectClass · 0.85
EndItemFunction · 0.85
GetPlotDrawListFunction · 0.85
ImHasFlagFunction · 0.85
RenderHeatmapFunction · 0.85

Tested by

no test coverage detected