[Qt-interest] Inverting a QPainterPath

David Boddie david.boddie at nokia.com
Wed Oct 7 17:46:05 CEST 2009


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

David
-- 
David Boddie
Senior Technical Writer
Nokia, Qt Development Frameworks



More information about the Qt-interest-old mailing list