26 #ifndef MLN_DRAW_DASHED_LINE_HH
27 # define MLN_DRAW_DASHED_LINE_HH
34 # include <mln/core/concept/function.hh>
35 # include <mln/core/concept/image.hh>
36 # include <mln/core/site_set/p_line2d.hh>
37 # include <mln/core/image/imorph/safe.hh>
38 # include <mln/data/fill.hh>
39 # include <mln/pw/image.hh>
40 # include <mln/pw/cst.hh>
64 const mln_psite(I)& beg,
const mln_psite(I)& end,
65 const mln_value(I)& v);
68 # ifndef MLN_INCLUDE_ONLY
73 template <
typename I,
unsigned dim>
74 struct dashed_line_f : Function_v2b<dashed_line_f<I, dim> >
78 bool operator()(
const mln_site(I)& p)
const
92 const mln_psite(I)& beg,
const mln_psite(I)& end,
93 const mln_value(I)& v)
96 mln_precondition(ima.is_valid());
99 trace::warning(
"Begin site is not part of the given image.");
101 trace::warning(
"End site is not part of the given image.");
103 data::fill(((ima |
p_line2d(beg, end)).rw() | internal::dashed_line_f<I, 1>()).rw(), v);
106 # endif // ! MLN_INCLUDE_ONLY
113 #endif // ! MLN_DRAW_DASHED_LINE_HH