12 #include <actsvg/meta.hpp>
46 std::tuple<actsvg::style::fill, actsvg::style::stroke>
fillAndStroke()
const {
47 actsvg::style::fill fll;
53 actsvg::style::stroke
str;
60 return std::tie(fll, str);
70 inline static actsvg::svg::object
group(
71 const std::vector<actsvg::svg::object>& objects,
const std::string&
name) {
72 actsvg::svg::object
gr;
75 for (
const auto& o : objects) {
95 if (not variable.empty()) {
96 mlabel = variable +
" = ";
101 if (not unit.empty()) {
107 {
static_cast<actsvg::scalar
>(xStart),
108 static_cast<actsvg::scalar>(yStart)},
109 {
static_cast<actsvg::scalar
>(xEnd), static_cast<actsvg::scalar>(yEnd)},
110 actsvg::style::stroke(), actsvg::style::marker({
"o"}),
111 actsvg::style::marker({
"|<<"}), actsvg::style::font(), mlabel);
124 return actsvg::draw::x_y_axes(
126 {
static_cast<actsvg::scalar
>(xMin), static_cast<actsvg::scalar>(xMax)},
127 {
static_cast<actsvg::scalar
>(yMin), static_cast<actsvg::scalar>(yMax)});
142 const std::vector<std::string>& info,
143 const Style& infoBoxStyle,
144 const actsvg::svg::object&
object) {
147 actsvg::style::font titleFont;
149 titleFont._size = infoBoxStyle.
fontSize;
151 actsvg::style::fill infoFill = fill;
152 infoFill._fc._opacity = 0.4;
153 actsvg::style::font infoFont;
154 infoFont._size = infoBoxStyle.
fontSize;
156 return actsvg::draw::connected_info_box(
157 object._id +
"_infoBox",
158 {
static_cast<actsvg::scalar
>(xPos), static_cast<actsvg::scalar>(yPos)},
159 title, fill, titleFont, info, infoFill, infoFont, stroke, object);
167 inline static void toFile(
const std::vector<actsvg::svg::object>& objects,
171 for (
const auto& o : objects) {
172 foutFile.add_object(o);