[Qt-interest] Inverting a QPainterPath

Josiah Bryan jbryan at productiveconcepts.com
Wed Oct 7 17:47:04 CEST 2009


David Boddie wrote:
> Josiah Bryan wrote:
> 
>> In reading the QPainterPath documentation at
>> (http://doc.trolltech.com/4.5/qpainterpath.html), I dont see a way to
>> "turn inside out" or "invert" the QPainter path. For example, in GIMP,
>> you can create a selection (or path from text) then "invert" it so
>> everything but the original path is selected. Is that dooable with a
>> QPainterPath?
> 
> Create another painter path, add a rectangle to it, and subtract the first
> path from it. Then draw that.
> 
>   http://doc.trolltech.com/4.5/qpainterpath.html#subtracted

How in the world did I miss ::subtracted ?? Crikey! That's exactly what 
I was looking for. Sorry everyone!

Thanks David!


-josiah




More information about the Qt-interest-old mailing list