bbox.x0 = bbox.x1 = i->x;
bbox.y0 = bbox.y1 = i->y;
-
+
+ ++i;
+
while (i != _points.end()) {
bbox.x0 = min (bbox.x0, i->x);
bbox.y0 = min (bbox.y0, i->y);
++i;
}
- _bounding_box = bbox.expand (_outline_width / 2);
+ _bounding_box = bbox.expand (_outline_width);
} else {
void
PolyItem::set (Points const & points)
{
- begin_change ();
-
- _points = points;
-
- _bounding_box_dirty = true;
- end_change ();
+ if (_points != points) {
+
+ begin_change ();
+
+ _points = points;
+
+ _bounding_box_dirty = true;
+ end_change ();
+ }
}
Points const &