12#include "detray/plugins/svgtools/meta/proto/information_section.hpp"
15#include "actsvg/core.hpp"
20namespace detray::svgtools::meta::display {
22template <concepts::point3D point3_t, concepts::point2D point2_t,
24inline auto information_section(
25 const std::string&
id,
26 const svgtools::meta::proto::information_section<point3_t>& is,
27 const view_t& view,
const point2_t& screen_offset,
28 const actsvg::svg::object& connected_object,
29 const bool use_relative_offset =
false) {
31 actsvg::style::fill title_fill;
32 title_fill._fc._rgb = is._color;
33 title_fill._fc._opacity = 0.8f;
34 actsvg::style::font title_font;
36 title_font._size = 16u;
37 title_font._fc = actsvg::style::color{{255, 255, 255}};
40 actsvg::style::fill info_fill;
41 info_fill._fc._rgb = is._color;
42 info_fill._fc._opacity = 0.4f;
44 actsvg::style::font info_font;
48 actsvg::style::stroke stroke;
52 ? (screen_offset + view(std::vector{is._position}).at(0))
55 return actsvg::draw::connected_info_box(
56 id, position, is._title, title_fill, title_font, is._info, info_fill,
57 info_font, stroke, connected_object, {
"mousedown",
"mouseout"});