开发者

QPolygon: How do I obtain the edges of the polygon

开发者 https://www.devze.com 2023-03-01 14:45 出处:网络
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) the

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).

0

精彩评论

暂无评论...
验证码 换一张
取 消