---
scribo/scribo/util/component_precise_outline.hh | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/scribo/scribo/util/component_precise_outline.hh
b/scribo/scribo/util/component_precise_outline.hh
index b618cb7..490b814 100644
--- a/scribo/scribo/util/component_precise_outline.hh
+++ b/scribo/scribo/util/component_precise_outline.hh
@@ -275,12 +275,16 @@ namespace scribo
waypoints.append(*first_pt);
unsigned i = 1;
const point2d* cur_pt = & points[i];
+ bool has_changed = false;
while (i < nelements)
{
+ has_changed = false;
+
while (cur_pt->row() == first_pt->row()
|| cur_pt->col() == first_pt->col())
{
+ has_changed = true;
++i;
if (i == nelements)
break;
@@ -301,6 +305,13 @@ namespace scribo
}
}
+ if (!has_changed)
+ {
+ ++i;
+ last_pt = cur_pt;
+ if (i < nelements)
+ cur_pt = & points[i];
+ }
waypoints.append(*last_pt);
first_pt = last_pt;
last_pt = first_pt;
@@ -308,6 +319,11 @@ namespace scribo
waypoints.append(*cur_pt);
}
+ else
+ {
+ for (unsigned i = 0; i < nelements; ++i)
+ waypoints.append(points[i]);
+ }
}
} // end of namespace scribo::util::internal
--
1.5.6.5
Show replies by date