[Qt-interest] Cosmetic Shapes
Jason A. Donenfeld
Jason at zx2c4.com
Mon Sep 20 02:24:44 CEST 2010
Hello,
I like how QPens can be cosmetic, meaning that when I draw something and
then zoom in on the scene, the line that the pen has drawn is the same size.
What is the equivalent for making full shapes cosmetic?
For example, I have a vector path editor. I have a QGraphicsPixmapItem, and
as its children I have a few QGraphicsPathItem. Each path item has a
collection of QGraphicsEllipseItems which are dragable. When the user drags
one of the ellipses, it drags that point of the QGraphicsPathItem. It is
easy to make the QGraphicsPathItem draw cosmetically by making the QPen
cosmetic, so that when the user zooms into the image, the vector line stays
the same size. But how do I make each dragable ellipse also stay the same
size when zooming in? What's the equivalent of 'cosmetic' for full shapes?
Or is the whole design, relying on cosmeticness, flawed in the first place?
Suggestions?
Jason
--
Jason A. Donenfeld
Deep Space Explorer
www.zx2c4.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100919/ffaef17f/attachment.html
More information about the Qt-interest-old
mailing list