QPainter CompositionMode or Interactive PseudoColor Mapping

Heads up! You've already completed this tutorial.

lee5378 | 2020-07-14 20:44:12 UTC | #1

I have been playing with the 36 QPainter Modes [Composition and RasterOp] in order to achieve an additive paint application. I expected to be able to paint shapes(rectangles) over each other in a fashion that the overlap between two or more rectangles is another color (say bright red) while leaving the non-overlapping part the same (say dull green). The issue is that I expected the rectangle to add pixel values together first then utilize a colormap, colortable, palette to colorize the individual pixels based on intensity. Perhaps CompostionMode is not the technique I should use. How can this be accomplished? I'd like to see the changes as the rectangles are being painted for an interactive application.


Well done, you've finished this tutorial! Mark As Complete
[[ user.completed.length ]] completed [[ user.streak+1 ]] day streak

QPainter CompositionMode or Interactive PseudoColor Mapping was written by Martin Fitzpatrick .

Martin Fitzpatrick has been developing Python/Qt apps for 8 years. Building desktop applications to make data-analysis tools more user-friendly, Python was the obvious choice. Starting with Tk, later moving to wxWidgets and finally adopting PyQt.