Files
plotter/include/plot/plot/annotation.hpp
T

23 lines
508 B
C++

#pragma once
#include <string>
#include <plot/core/color.hpp>
#include <plot/core/types.hpp>
namespace plot {
/// A pinned point with a text caption. `x`/`y` are data coordinates on the
/// `axis_x`/`axis_y` pair; the text is UTF-8 and is measured through the plot's
/// text backend, exactly like an axis label.
struct Annotation {
f64 x = 0.0;
f64 y = 0.0;
std::string text;
Color color = Color::hex(0xE8E8E8);
u32 axis_x = 0;
u32 axis_y = 0;
bool visible = true;
};
} // namespace plot