Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 Qt4 GraphicsView 框架绘制一些多边形,并且允许用户放大和缩小绘图。当用户更改视图中的缩放级别(比例)时,我希望多边形变得越来越小,但是有没有办法使轮廓厚度始终保持不变?
谢谢!
是的,我想至少有这种可能性:
你可以打电话
void QPen::setCosmetic ( bool cosmetic )
在用于绘制多边形的笔上具有 TRUE 值。无论在 QPainter 上应用任何转换,此属性都允许保持宽度不变!
希望能帮助到你 !