| 3167 | |
| 3168 | template <typename T> |
| 3169 | void 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); |
| 3183 | CALL_INSTANTIATE_FOR_NUMERIC_TYPES() |
| 3184 | #undef INSTANTIATE_MACRO |
no test coverage detected