* doc/examples/ima-save.cc: Add a FIXME.
* doc/examples/ima-load.cc: Likewise.
Avoid hard-coded paths.
* doc/examples/tuto4/image.cc: Make it compile.
* doc/img/small.pbm: New symbolic link to img/small.pbm.
* doc/examples/split/ima-load-1.cc.raw: Regen.
* doc/examples/fill-imageif-cfun.cc,
* figures.mk,
* ppm-figures.mk:
s/fill-subimage-cfun/fill-imageif-cfun/.
---
milena/ChangeLog | 15 +++++++++++++++
milena/doc/examples/fill-imageif-cfun.cc | 2 +-
milena/doc/examples/ima-load.cc | 8 +++++++-
milena/doc/examples/ima-save.cc | 3 +++
milena/doc/examples/split/ima-load-1.cc.raw | 2 +-
milena/doc/examples/tuto4/image.cc | 4 +---
milena/doc/figures.mk | 2 +-
milena/doc/img/small.pbm | 1 +
milena/doc/ppm-figures.mk | 1 -
9 files changed, 30 insertions(+), 8 deletions(-)
create mode 120000 milena/doc/img/small.pbm
diff --git a/milena/ChangeLog b/milena/ChangeLog
index d9517af..937fced 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,20 @@
2010-03-17 Roland Levillain <roland(a)lrde.epita.fr>
+ Fix programs in doc/examples/.
+
+ * doc/examples/ima-save.cc: Add a FIXME.
+ * doc/examples/ima-load.cc: Likewise.
+ Avoid hard-coded paths.
+ * doc/examples/tuto4/image.cc: Make it compile.
+ * doc/img/small.pbm: New symbolic link to img/small.pbm.
+ * doc/examples/split/ima-load-1.cc.raw: Regen.
+ * doc/examples/fill-imageif-cfun.cc,
+ * figures.mk,
+ * ppm-figures.mk:
+ s/fill-subimage-cfun/fill-imageif-cfun/.
+
+2010-03-17 Roland Levillain <roland(a)lrde.epita.fr>
+
Update PNG-to-EPS conversion rule.
* doc/Makefile.am (.png.eps): No longer try to build figures/ in
diff --git a/milena/doc/examples/fill-imageif-cfun.cc
b/milena/doc/examples/fill-imageif-cfun.cc
index 14fa3bb..7f1ff46 100644
--- a/milena/doc/examples/fill-imageif-cfun.cc
+++ b/milena/doc/examples/fill-imageif-cfun.cc
@@ -46,5 +46,5 @@ int main()
data::fill((ima2 | row_oddity).rw(), literal::red);
// \}
- doc::ppmsave(ima2, "fill-subimage-cfun");
+ doc::ppmsave(ima2, "fill-imageif-cfun");
}
diff --git a/milena/doc/examples/ima-load.cc b/milena/doc/examples/ima-load.cc
index 321ba9c..d3c57a8 100644
--- a/milena/doc/examples/ima-load.cc
+++ b/milena/doc/examples/ima-load.cc
@@ -1,10 +1,16 @@
#include <mln/core/image/image2d.hh>
#include <mln/io/pbm/load.hh>
+
+#include "doc/tools/data.hh"
+
int main()
{
using namespace mln;
+ /* FIXME: MLN_DOC_DIR looks probably confusing in the
+ documentation... But we have to handle parallel builds. Maybe a
+ solution could be to prepare the the build dir for data? */
// \{
image2d<bool> ima;
- io::pbm::load(ima, "my_image.pbm");
+ io::pbm::load(ima, MLN_DOC_DIR "/img/small.pbm");
// \}
}
diff --git a/milena/doc/examples/ima-save.cc b/milena/doc/examples/ima-save.cc
index b93945b..e988d11 100644
--- a/milena/doc/examples/ima-save.cc
+++ b/milena/doc/examples/ima-save.cc
@@ -17,6 +17,9 @@ int main()
};
image2d<bool> ima = make::image(vals);
+ /* FIXME: MLN_DOC_DIR looks probably confusing in the
+ documentation... But we have to handle parallel builds. Maybe a
+ solution could be to prepare the the build dir for data? */
// \{
io::pbm::save(ima, MLN_DOC_DIR "/figures/ima_save.pbm");
// \}
diff --git a/milena/doc/examples/split/ima-load-1.cc.raw
b/milena/doc/examples/split/ima-load-1.cc.raw
index 3f0f30f..532d58d 100644
--- a/milena/doc/examples/split/ima-load-1.cc.raw
+++ b/milena/doc/examples/split/ima-load-1.cc.raw
@@ -1,2 +1,2 @@
image2d<bool> ima;
- io::pbm::load(ima, "my_image.pbm");
+ io::pbm::load(ima, MLN_DOC_DIR "/img/small.pbm");
diff --git a/milena/doc/examples/tuto4/image.cc b/milena/doc/examples/tuto4/image.cc
index a15af5e..af8a2d9 100644
--- a/milena/doc/examples/tuto4/image.cc
+++ b/milena/doc/examples/tuto4/image.cc
@@ -8,7 +8,5 @@ int main()
image2d<value::int_u8> input(2,2);
box2d b(2,2);
- image2d<value::int_u8> input(b);
-
- image2d<value::int_u8>
+ image2d<value::int_u8> input2(b);
}
diff --git a/milena/doc/figures.mk b/milena/doc/figures.mk
index e6ea731..3519e3f 100644
--- a/milena/doc/figures.mk
+++ b/milena/doc/figures.mk
@@ -46,7 +46,7 @@ $(srcdir)/figures/fill-subdomain-1.pbm
$(srcdir)/figures/fill-subdomain-2.ppm $(
$(MAKE) $(AM_MAKEFLAGS) $<; \
fi
-$(srcdir)/figures/fill-subimage-cfun-1.ppm: $(srcdir)/examples/fill-imageif-cfun.stamp
+$(srcdir)/figures/fill-imageif-cfun-1.ppm: $(srcdir)/examples/fill-imageif-cfun.stamp
## Recover from the removal of $@
@if test -f $@; then :; else \
rm -f $<; \
diff --git a/milena/doc/img/small.pbm b/milena/doc/img/small.pbm
new file mode 120000
index 0000000..47b607b
--- /dev/null
+++ b/milena/doc/img/small.pbm
@@ -0,0 +1 @@
+../../img/small.pbm
\ No newline at end of file
diff --git a/milena/doc/ppm-figures.mk b/milena/doc/ppm-figures.mk
index 835a32e..25b9033 100644
--- a/milena/doc/ppm-figures.mk
+++ b/milena/doc/ppm-figures.mk
@@ -12,7 +12,6 @@ PPM_FIGURES = \
$(srcdir)/figures/fill-subdomain-2.ppm \
$(srcdir)/figures/fill-subdomain-3.ppm \
$(srcdir)/figures/fill-subdomain-4.ppm \
- $(srcdir)/figures/fill-subimage-cfun-1.ppm \
$(srcdir)/figures/ima2d-rot-1.ppm \
$(srcdir)/figures/ima2d-rot-2.ppm \
$(srcdir)/figures/labeling-compute-2.ppm \
--
1.5.6.5
Show replies by date