26 #ifndef SCRIBO_IO_IMG_INTERNAL_TEXT_IMG_VISITOR_HH
27 # define SCRIBO_IO_IMG_INTERNAL_TEXT_IMG_VISITOR_HH
35 # include <mln/core/image/image2d.hh>
36 # include <mln/value/rgb8.hh>
37 # include <mln/draw/box.hh>
38 # include <mln/literal/colors.hh>
40 # include <scribo/core/internal/doc_serializer.hh>
41 # include <scribo/core/document.hh>
42 # include <scribo/core/component_set.hh>
43 # include <scribo/core/paragraph_set.hh>
44 # include <scribo/core/line_info.hh>
84 # ifndef MLN_INCLUDE_ONLY
99 text_img_visitor::visit(
const document<L>& doc)
const
101 mln_precondition(doc.is_open());
109 doc.paragraphs().accept(*
this);
114 template <
typename L>
118 for_all_comps(c, comp_set)
119 if (comp_set(c).is_valid())
120 comp_set(c).accept(*this);
126 template <typename L>
128 text_img_visitor::visit(const
paragraph_set<L>& parset)
const
132 for_all_paragraphs(p, parset)
136 for_all_paragraph_lines(lid, line_ids)
139 lines(l).accept(*
this);
147 template <
typename L>
149 text_img_visitor::visit(
const line_info<L>&
line)
const
154 #endif // MLN_INCLUDE_ONLY
164 #endif // SCRIBO_IO_IMG_INTERNAL_TEXT_IMG_VISITOR_HH