문제

I am using QPolygon class. Is there any method which gives the edges of the respective polygon?

도움이 되었습니까?

해결책

If by edges you mean the bounding box (smallest rectangle that encloses the polygon) then it's boundingRect().

If you are talking about the edges that are made up of vertexes, then they are just lines in the polygon. QPolygon is just a QVector<QPoint> derived class. The edges are the lines constructed with consecutive QPoints in the list (plus the one from the last point to the first).

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top