15#ifndef RTREEMAPBASE_HXX
16#define RTREEMAPBASE_HXX
49 Node(
const std::string &
name,
const std::string &
type, uint64_t
size, uint64_t childrenIdx, uint64_t nChildren)
57 Vec2(
float xArg,
float yArg) :
x(xArg),
y(yArg) {}
65 RGBColor(uint8_t rArg, uint8_t gArg, uint8_t bArg, uint8_t aArg = 255) :
r(rArg),
g(gArg),
b(bArg),
a(aArg) {}
82 virtual void AddBox(
const Rect &rect,
const RGBColor &color,
float borderWidth = 0.15f)
const = 0;
87 const RGBColor &color =
RGBColor(0, 0, 0),
bool alignCenter =
false)
const = 0;
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
virtual void AddText(const Vec2 &pos, const std::string &content, float size, const RGBColor &color=RGBColor(0, 0, 0), bool alignCenter=false) const =0
Logic for drawing a text.
std::vector< Node > fNodes
virtual ~RTreeMapBase()=default
void DrawLegend() const
Logic for drawing the legend of leaf types.
virtual void AddBox(const Rect &rect, const RGBColor &color, float borderWidth=0.15f) const =0
Logic for drawing a box.
void DrawTreeMap(const Node &elem, Rect rect, int depth) const
Logic for drawing the entirety of the treemap.
Namespace for ROOT features in testing.
Node(const std::string &name, const std::string &type, uint64_t size, uint64_t childrenIdx, uint64_t nChildren)
RGBColor(uint8_t rArg, uint8_t gArg, uint8_t bArg, uint8_t aArg=255)
Rect(const Vec2 &bottomLeftArg, const Vec2 &topRightArg)
Vec2(float xArg, float yArg)