Qt's RasterOp_NotSourceXorDestination not working on MAC
I'm basically trying to give rubberbanding effect to my drawing, I'm using the setCompositionMode method of the QPainter开发者_如何学Go to set the composition mode to RasterOp_NotSourceXorDestination its working fine on windows but not on MAC.
setCompositionMode(QPainter::RasterOp_NotSourceXorDestination); is working on Windows but not on MAC pc.
Does anybody have an idea as to why is it not working on MAC and what alternative should i use if not RasterOp_NotSourceXorDestination.
The bitwise raster operation modes, denoted with a RasterOp prefix, are only natively supported in the X11 and raster paint engines. This means that the only way to utilize these modes on the Mac is via a PySide.QtGui.QImage . The RasterOp denoted blend modes are not supported for pens and brushes with alpha components. Also, turning on the QPainter.Antialiasing render hint will effectively disable the RasterOp modes.
When the paint device is a PySide.QtGui.QImage , the image format must be set to Format_ARGB32Premultiplied or Format_ARGB32 for the composition modes to have any effect. For performance the premultiplied version is the preferred format.
Cheers!!!
精彩评论