27 #ifndef SCRIBO_DEBUG_CHAR_SPACE_IMAGE_HH
28 # define SCRIBO_DEBUG_CHAR_SPACE_IMAGE_HH
34 # include <mln/core/concept/image.hh>
35 # include <mln/core/alias/point2d.hh>
36 # include <mln/value/rgb8.hh>
37 # include <mln/data/convert.hh>
39 # include <mln/draw/box.hh>
40 # include <mln/draw/line.hh>
42 # include <mln/literal/colors.hh>
44 # include <scribo/core/line_set.hh>
60 template <
typename I,
typename L>
63 const
value::rgb8& v = literal::cyan);
66 # ifndef MLN_INCLUDE_ONLY
69 template <
typename I,
typename L>
74 mln_trace(
"scribo::debug::char_space_image");
78 const component_set<L>& comps = line.
components();
79 for_all_lines(l, line)
81 if (!
line(l).is_valid() ||
line(l).is_hidden()
82 ||
line(l).component_ids().size() < 2)
86 for_all_elements(i,
line(l).component_ids())
91 unsigned c =
line(l).component_ids()[i];
94 beg = comps(c).bbox().pmax(),
96 beg.
row() = comps(c).bbox().pmin().row();
98 beg.
col() +=
line(l).char_space();
99 end.col() +=
line(l).char_space();
109 # endif // ! MLN_INCLUDE_ONLY
115 #endif // ! SCRIBO_DEBUG_CHAR_SPACE_IMAGE_HH