forked from AliceO2Group/AliceO2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathimgui_extras.h
More file actions
52 lines (46 loc) · 1.29 KB
/
imgui_extras.h
File metadata and controls
52 lines (46 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#ifndef IMGUI_EXTRAS_H
#define IMGUI_EXTRAS_H
#include "imgui.h"
namespace ImGui
{
// Start PlotMultiLines(...) and PlotMultiHistograms(...)------------------------
// heavily modivied version starting from code of @JaapSuter and @maxint (please see: https://github.com/ocornut/imgui/issues/632)
static inline ImU32 InvertColorU32(ImU32 in)
{
ImVec4 in4 = ColorConvertU32ToFloat4(in);
in4.x = 1.f - in4.x;
in4.y = 1.f - in4.y;
in4.z = 1.f - in4.z;
return GetColorU32(in4);
}
void PlotMultiLines(
const char* label,
int num_datas,
const char** names,
const ImColor* colors,
float (*getterY)(const void* data, int idx),
size_t (*getterX)(const void* data, int idx),
const void* const* datas,
int values_count,
float scale_min,
float scale_max,
size_t domain_min,
size_t domain_max,
ImVec2 graph_size);
void PlotMultiHistograms(
const char* label,
int num_hists,
const char** names,
const ImColor* colors,
float (*getterY)(const void* data, int idx),
size_t (*getterX)(const void* data, int idx),
const void* const* datas,
int values_count,
float scale_min,
float scale_max,
size_t domain_min,
size_t domain_max,
ImVec2 graph_size);
// End PlotMultiLines(...) and PlotMultiHistograms(...)--------------------------
} // namespace ImGui
#endif // IMGUI_EXTRAS_H