View Full Version : QPainter Question
atb
14th March 2008, 03:09
Hi
I would like to add a industry-specific primitive to QPainter. So when I use QGraphicsScene or write to a PDF device, this primitive can be used. How would I archive this?
thanks in advance
Andrew
wysota
14th March 2008, 08:36
Could you provide more details? Why would you want to add such a primitive?
atb
18th March 2008, 03:04
Hi
I wanted to do this to pass a file through the painting system into a QGraphicScene with the primitives from the file. This would allow the industry-specific primitives to be edited instead of the basic painter primitives
The way I found to do this is to use QPaintPath.
Thanks for your post
Andrew
wysota
18th March 2008, 11:28
From what you say it probably means you want to implement a custom QGraphicsItem. You don't need to modify the painter object, simply reimplement QGraphicsItem::paint().
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.