Hi,
I'm in the process of porting an MFC/GDI+ application to QT. So far it was fairly smooth, but now I have a problem with clipping. I need to be able to exclude an area from painting.
In GDI this is done with the flag CombineModeExclude like this:
....paint dark rectagle....
...add hexagon points to "pointList"...
GraphicsPath path(FillModeAlternate);
path.AddPolygon(pointList, count);
graphics.SetClip(&path, CombineModeExclude);
...paint bright rectangle...
That creates something like this:
The hexagon is the path that is excluded from clipping. Qt doens't seem to provide something similar among it's flags in enum Qt::ClipOperation. I can include areas, but not exclude.
Does anyone have a workaround or an idea how to achieve this in Qt?
Bookmarks