summaryrefslogtreecommitdiffstats
path: root/tdegtk
diff options
context:
space:
mode:
Diffstat (limited to 'tdegtk')
-rw-r--r--tdegtk/tqtcairopainter.cpp86
1 files changed, 85 insertions, 1 deletions
diff --git a/tdegtk/tqtcairopainter.cpp b/tdegtk/tqtcairopainter.cpp
index f45bce2..44b1895 100644
--- a/tdegtk/tqtcairopainter.cpp
+++ b/tdegtk/tqtcairopainter.cpp
@@ -181,12 +181,96 @@ void TQt3CairoPaintDevice::transferIntermediateSurface() {
devicePixel_b = (*(device_surface_data+offset+ARGB_B_BYTE_NUMBER));
// Perform requested bitwise operation
- if (m_rop == TQPainter::XorROP) {
+ if (m_rop == TQPainter::OrROP) {
+ combinedPixel_a = devicePixel_a;
+ combinedPixel_r = devicePixel_r | intermediatePixel_r;
+ combinedPixel_g = devicePixel_g | intermediatePixel_g;
+ combinedPixel_b = devicePixel_b | intermediatePixel_b;
+ }
+ else if (m_rop == TQPainter::XorROP) {
combinedPixel_a = devicePixel_a;
combinedPixel_r = devicePixel_r ^ intermediatePixel_r;
combinedPixel_g = devicePixel_g ^ intermediatePixel_g;
combinedPixel_b = devicePixel_b ^ intermediatePixel_b;
}
+ else if (m_rop == TQPainter::NotAndROP) {
+ combinedPixel_a = devicePixel_a;
+ combinedPixel_r = devicePixel_r & (~intermediatePixel_r);
+ combinedPixel_g = devicePixel_g & (~intermediatePixel_g);
+ combinedPixel_b = devicePixel_b & (~intermediatePixel_b);
+ }
+ else if (m_rop == TQPainter::NotCopyROP) {
+ combinedPixel_a = intermediatePixel_a;
+ combinedPixel_r = ~intermediatePixel_r;
+ combinedPixel_g = ~intermediatePixel_g;
+ combinedPixel_b = ~intermediatePixel_b;
+ }
+ else if (m_rop == TQPainter::NotOrROP) {
+ combinedPixel_a = devicePixel_a;
+ combinedPixel_r = devicePixel_r | (~intermediatePixel_r);
+ combinedPixel_g = devicePixel_g | (~intermediatePixel_g);
+ combinedPixel_b = devicePixel_b | (~intermediatePixel_b);
+ }
+ else if (m_rop == TQPainter::NotXorROP) {
+ combinedPixel_a = devicePixel_a;
+ combinedPixel_r = devicePixel_r ^ (~intermediatePixel_r);
+ combinedPixel_g = devicePixel_g ^ (~intermediatePixel_g);
+ combinedPixel_b = devicePixel_b ^ (~intermediatePixel_b);
+ }
+ else if (m_rop == TQPainter::AndROP) {
+ combinedPixel_a = devicePixel_a;
+ combinedPixel_r = devicePixel_r & intermediatePixel_r;
+ combinedPixel_g = devicePixel_g & intermediatePixel_g;
+ combinedPixel_b = devicePixel_b & intermediatePixel_b;
+ }
+ else if (m_rop == TQPainter::NotROP) {
+ combinedPixel_a = devicePixel_a;
+ combinedPixel_r = ~devicePixel_r;
+ combinedPixel_g = ~devicePixel_g;
+ combinedPixel_b = ~devicePixel_b;
+ }
+ else if (m_rop == TQPainter::ClearROP) {
+ combinedPixel_a = 0x0;
+ combinedPixel_r = 0x0;
+ combinedPixel_g = 0x0;
+ combinedPixel_b = 0x0;
+ }
+ else if (m_rop == TQPainter::SetROP) {
+ combinedPixel_a = 0xff;
+ combinedPixel_r = 0xff;
+ combinedPixel_g = 0xff;
+ combinedPixel_b = 0xff;
+ }
+ else if (m_rop == TQPainter::NopROP) {
+ combinedPixel_a = devicePixel_a;
+ combinedPixel_r = devicePixel_r;
+ combinedPixel_g = devicePixel_g;
+ combinedPixel_b = devicePixel_b;
+ }
+ else if (m_rop == TQPainter::AndNotROP) {
+ combinedPixel_a = devicePixel_a;
+ combinedPixel_r = (~devicePixel_r) & intermediatePixel_r;
+ combinedPixel_g = (~devicePixel_g) & intermediatePixel_g;
+ combinedPixel_b = (~devicePixel_b) & intermediatePixel_b;
+ }
+ else if (m_rop == TQPainter::OrNotROP) {
+ combinedPixel_a = devicePixel_a;
+ combinedPixel_r = (~devicePixel_r) | intermediatePixel_r;
+ combinedPixel_g = (~devicePixel_g) | intermediatePixel_g;
+ combinedPixel_b = (~devicePixel_b) | intermediatePixel_b;
+ }
+ else if (m_rop == TQPainter::NandROP) {
+ combinedPixel_a = devicePixel_a;
+ combinedPixel_r = ~(devicePixel_r & intermediatePixel_r);
+ combinedPixel_g = ~(devicePixel_g & intermediatePixel_g);
+ combinedPixel_b = ~(devicePixel_b & intermediatePixel_b);
+ }
+ else if (m_rop == TQPainter::NorROP) {
+ combinedPixel_a = devicePixel_a;
+ combinedPixel_r = ~(devicePixel_r | intermediatePixel_r);
+ combinedPixel_g = ~(devicePixel_g | intermediatePixel_g);
+ combinedPixel_b = ~(devicePixel_b | intermediatePixel_b);
+ }
else {
tqWarning("TQt3CairoPaintDevice::cmd: Unhandled raster operation [Was attempting to use raster operation %d\n\r", m_rop);
combinedPixel_a = devicePixel_a;