PDA

View Full Version : Draw an 1-bit mask in color?



stephenju
9th March 2010, 15:51
Is there a way to draw a 1-bit mask image in color?

I have an runtime generated 1-bit mask and need to draw the mask in an
user specified color over other graphics items. The 1s in the bitmap
need to be in the user color and 0s as transparent.

From the doc, it seems that I need to create a QPixmap and fill it with
the color. Then setMask using the bitmap. This seems to be a lot of work
(and memory) to do something simple.

Thanks