mirror of https://github.com/CGAL/cgal
When the polyline is closed we duplicate the first point
This commit is contained in:
parent
8457fce8f2
commit
4094ca645b
|
|
@ -51,11 +51,11 @@ protected:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
QPolygonF polygon;
|
QPolygonF polygon;
|
||||||
|
bool closed_;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QGraphicsPathItem *path_item;
|
QGraphicsPathItem *path_item;
|
||||||
QGraphicsLineItem *b, *e;
|
QGraphicsLineItem *b, *e;
|
||||||
bool closed_;
|
|
||||||
int n_;
|
int n_;
|
||||||
QPointF sp;
|
QPointF sp;
|
||||||
QGraphicsScene *scene_;
|
QGraphicsScene *scene_;
|
||||||
|
|
@ -75,6 +75,9 @@ protected:
|
||||||
std::list<typename K::Point_2> points;
|
std::list<typename K::Point_2> points;
|
||||||
Converter<K> convert;
|
Converter<K> convert;
|
||||||
convert(points, this->polygon);
|
convert(points, this->polygon);
|
||||||
|
if(closed_){
|
||||||
|
points.push_back(points.front());
|
||||||
|
}
|
||||||
emit(generate(CGAL::make_object(points)));
|
emit(generate(CGAL::make_object(points)));
|
||||||
}
|
}
|
||||||
}; // end class GraphicsViewPolylineInput
|
}; // end class GraphicsViewPolylineInput
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue