[PyQt] masks and antialiasing
Victor Noagbodji
noagbodjivictor at gmail.com
Fri Feb 12 04:07:56 GMT 2010
hi all,
isn't it possible to have antialiasing when using a mask? consider the
following lines which creates a rounded rect mask.
try:
bmp = QPixmap(param.sizeHint())
except AttributeError:
bmp = QPixmap(param)
p = QPainter(bmp)
p.setPen(Qt.blue)
p.setBrush(QBrush(Qt.blue))
p.setRenderHints(QPainter.Antialiasing)
p.fillRect(bmp.rect(), Qt.red)
p.drawRoundedRect(bmp.rect(), 15, 15)
p.end()
return bmp.createHeuristicMask()
it works. however even with the render hints, the rounded corners are
not antialiased. i think the mask is applied using only a single
color.
any idea?
thanks
--
paul victor noagbodji
More information about the PyQt
mailing list