Important: Please read the Qt Code of Conduct -

QPainter CompositionMode

  • I have various shapes painted over an image with QPainter. Each shape has a semitransparent color. Where the shapes overlap, I want to view the topmost shape only combined with the background (see image). Is this possible using QPainter's composition modes, or do I need to need to calculate overlap and draw them seperately. Thankscomp2.png

Log in to reply