---
scribo/ChangeLog | 4 ++
...s_bottom_aligned.hh => object_links_aligned.hh} | 39 ++++++++++----------
2 files changed, 23 insertions(+), 20 deletions(-)
copy scribo/scribo/filter/{object_links_bottom_aligned.hh => object_links_aligned.hh}
(70%)
diff --git a/scribo/ChangeLog b/scribo/ChangeLog
index d9e7e96..1644058 100644
--- a/scribo/ChangeLog
+++ b/scribo/ChangeLog
@@ -1,5 +1,9 @@
2011-03-14 Guillaume Lazzara <z(a)lrde.epita.fr>
+ * scribo/filter/object_links_aligned.hh: New.
+
+2011-03-14 Guillaume Lazzara <z(a)lrde.epita.fr>
+
* scribo/primitive/extract/separators_nonvisible.hh: Cleanup and
improve debug support.
diff --git a/scribo/scribo/filter/object_links_bottom_aligned.hh
b/scribo/scribo/filter/object_links_aligned.hh
similarity index 70%
copy from scribo/scribo/filter/object_links_bottom_aligned.hh
copy to scribo/scribo/filter/object_links_aligned.hh
index 2329f37..e37bcb6 100644
--- a/scribo/scribo/filter/object_links_bottom_aligned.hh
+++ b/scribo/scribo/filter/object_links_aligned.hh
@@ -1,5 +1,4 @@
-// Copyright (C) 2009, 2010, 2011 EPITA Research and Development
-// Laboratory (LRDE)
+// Copyright (C) 2011 EPITA Research and Development Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -24,21 +23,18 @@
// exception does not however invalidate any other reasons why the
// executable file might be covered by the GNU General Public License.
-#ifndef SCRIBO_FILTER_OBJECT_LINKS_BOTTOM_ALIGNED_HH
-# define SCRIBO_FILTER_OBJECT_LINKS_BOTTOM_ALIGNED_HH
+#ifndef SCRIBO_FILTER_OBJECT_LINKS_ALIGNED_HH
+# define SCRIBO_FILTER_OBJECT_LINKS_ALIGNED_HH
/// \file
///
-/// Invalidate links between two components if their bottom are not
-/// aligned.
-
-
-# include <mln/util/array.hh>
+/// Invalidate links between two components if their not aligned
+/// according to an anchor.
# include <scribo/core/macros.hh>
# include <scribo/core/object_links.hh>
-# include <scribo/filter/object_links_aligned.hh>
+# include <scribo/filter/object_links_non_aligned_simple.hh>
namespace scribo
{
@@ -48,11 +44,11 @@ namespace scribo
using namespace mln;
- /*! \brief Invalidate links between two components if their bottom are not
- aligned.
+ /*! \brief Invalidate links between two components according to a specific anchor.
\param[in] links Object links information.
\param[in] max_alpha Maximum angle value (degrees).
+ \param[in] anchor Anchor used to compute angles.
\verbatim
@@ -75,13 +71,15 @@ namespace scribo
~
\endverbatim
+ Example with an anchor set to the bottom right :
The angle between the two bottoms must be lower than \p max_alpha.
*/
template <typename L>
object_links<L>
- object_links_bottom_aligned(const object_links<L>& links,
- float max_alpha);
+ object_links_aligned(const object_links<L>& links,
+ float max_alpha,
+ anchor::Type anchor);
# ifndef MLN_INCLUDE_ONLY
@@ -89,17 +87,18 @@ namespace scribo
template <typename L>
object_links<L>
- object_links_bottom_aligned(const object_links<L>& links,
- float max_alpha)
+ object_links_aligned(const object_links<L>& links,
+ float max_alpha,
+ anchor::Type anchor)
{
- trace::entering("scribo::filter::object_links_bottom_aligned");
+ trace::entering("scribo::filter::object_links_aligned");
mln_precondition(links.is_valid());
object_links<L>
- output = object_links_aligned(links, max_alpha, anchor::Bottom);
+ output = object_links_non_aligned_simple(links, anchor, max_alpha);
- trace::exiting("scribo::filter::object_links_bottom_aligned");
+ trace::exiting("scribo::filter::object_links_aligned");
return output;
}
@@ -112,4 +111,4 @@ namespace scribo
} // end of namespace scribo
-#endif // ! SCRIBO_FILTER_OBJECT_LINKS_BOTTOM_ALIGNED_HH
+#endif // ! SCRIBO_FILTER_OBJECT_LINKS_ALIGNED_HH
--
1.5.6.5
Show replies by date