~kubuntu-members/kolourpaint/4.11

« back to all changes in this revision

Viewing changes to pixmapfx/kpPixmapFX_Transforms.cpp

  • Committer: Martin Koller
  • Date: 2012-08-06 18:00:53 UTC
  • Revision ID: git-v1:b5bd37570007d9d2d965b6b776ab56345177d66c
on resizing, make sure to not double apply the alpha channel

BUG: 304658
FIXED-IN: 4.9.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
67
67
 
68
68
    // Would have new undefined areas?
69
69
    if (w > oldWidth || h > oldHeight)
70
 
    {
71
 
    #if DEBUG_KP_PIXMAP_FX && 1
72
 
        kDebug () << "\tbacking with fill opqaque="
73
 
                  << backgroundColor.isOpaque () << endl;
74
 
    #endif
75
70
        newImage.fill (backgroundColor.toQRgb ());
76
 
    }
77
71
 
78
72
    // Copy over old pixmap.
79
73
    QPainter painter(&newImage);
 
74
    painter.setCompositionMode(QPainter::CompositionMode_Source);
80
75
    painter.drawImage(0, 0, *destPtr);
81
76
    painter.end();
82
77