---
scribo/ChangeLog | 5 +++++
scribo/scribo/util/component_precise_outline.hh | 9 +++++----
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/scribo/ChangeLog b/scribo/ChangeLog
index 5982c33..216f480 100644
--- a/scribo/ChangeLog
+++ b/scribo/ChangeLog
@@ -1,3 +1,8 @@
+2013-04-17 Guillaume Lazzara <z(a)lrde.epita.fr>
+
+ * scribo/util/component_precise_outline.hh: Check if sites are
+ part of the image.
+
2013-04-12 Guillaume Lazzara <z(a)lrde.epita.fr>
* doc/Makefile.am: Remove duplicate '/' in path.
diff --git a/scribo/scribo/util/component_precise_outline.hh
b/scribo/scribo/util/component_precise_outline.hh
index cef6096..f3a02fb 100644
--- a/scribo/scribo/util/component_precise_outline.hh
+++ b/scribo/scribo/util/component_precise_outline.hh
@@ -124,7 +124,7 @@ namespace scribo
const point2d p3(cur_pt.row() + offset[direction][7][1],
cur_pt.col() + offset[direction][7][0]);
- if ((input(p2) != id) && (input(p3) == id))
+ if ((input.has(p2) && input(p2) != id) && (input.has(p3) &&
input(p3) == id))
{
direction = 3;
return;
@@ -190,7 +190,7 @@ namespace scribo
const point2d p3(cur_pt.row() + offset[direction][7][1],
cur_pt.col() + offset[direction][7][0]);
- if ((input(p2) != id) && (input(p3) == id))
+ if ((input.has(p2) && input(p2) != id) && (input.has(p3) &&
input(p3) == id))
{
direction = 1;
return;
@@ -224,7 +224,8 @@ namespace scribo
const point2d p3(cur_pt.row() + offset[direction][7][1],
cur_pt.col() + offset[direction][7][0]);
- if ((input(p2) != id) && ((input(p1) == id) || (input(p3) == id)))
+ if ((input.has(p2) && input(p2) != id)
+ && ((input.has(p1) && input(p1) == id) || (input.has(p3) &&
input(p3) == id)))
{
direction = 2;
return;
@@ -268,7 +269,7 @@ namespace scribo
tmp = point2d(cur_pt.row() + offset[direction][i][1],
cur_pt.col() + offset[direction][i][0]);
- if (input(tmp) == id)
+ if (input.has(tmp) && input(tmp) == id)
break;
}
--
1.7.2.5
Show replies by date