Quantcast
Channel: QtWebEngine
Viewing all articles
Browse latest Browse all 13965

Composition mode help...

$
0
0
I’m writing a driver for a graphics system so it can be ported to X, and QT seemed to help out in a lot of ways, but I can’t get my head around how to set the composition mode to get the various effects that the old system could do. The old system can do: Replace – All pixels from source replace corresponding pixels in destination – this I think is QPainter::CompositionMode_Source Transparent – Only non-black (ie: 0) pixels from source will replace corresponding pixels in destination. I can’t find a corresponding mode for this. XOR – standard XOR, I can do this with QPainter::RasterOp_SourceXorDestination Reverse transparent – Only the black pixels (ie: 0) from the source will replace the corresponding pixels in destination. The pixels will be coloured as the current foreground colour. I can’t really see how to do (2) and (4) without creating QImages to get masks and playing with alpha values and doing multiple blits. The old system doesn’t have alpha, so all the colours it draws effectively have alpha=1. Any help gratefully received :) Simon

Viewing all articles
Browse latest Browse all 13965

Trending Articles