Skip to content

Commit

Permalink
Merge pull request #7357 from mentonin/converter-to-qpolygon
Browse files Browse the repository at this point in the history
Converter to qpolygon
  • Loading branch information
lrineau committed Apr 17, 2023
2 parents 63e9d92 + fafef01 commit 2c84890
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
7 changes: 6 additions & 1 deletion GraphicsView/doc/GraphicsView/CGAL/Qt/Converter.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ Converts a point.
*/
QPointF operator()(K::Point_2);

/*!
Converts a circular arc point.
*/
QPointF operator()(K::Circular_arc_point_2);

/*!
Converts a segment.
*/
Expand Down Expand Up @@ -94,7 +99,7 @@ K::Iso_rectangle_2 operator()(QRectF);
/*!
Converts a polygon to a list of points.
*/
std::list<K::Point_2> operator()(QPolygonF);
void operator()(std::list<K::Point_2>&, QPolygonF);

/// @}

Expand Down
9 changes: 9 additions & 0 deletions GraphicsView/include/CGAL/Qt/Converter.h
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,15 @@ class Converter {
return qp;
}

QPolygonF operator()(const std::list< CGAL_Point_2 >& p) const
{
QPolygonF qp;
for(int i = 0; i < p.size(); i++){
qp << operator()(p[i]);
}
return qp;
}


void operator()(std::list< CGAL_Point_2 >& p, const QPolygonF& qp) const
{
Expand Down

0 comments on commit 2c84890

Please sign in to comment.