[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdegraphics/kolourpaint/pixmapfx
From: Clarence Dang <dang () kde ! org>
Date: 2006-05-03 9:22:53
Message-ID: 1146648173.165239.25772.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 536856 by dang:
Revert copyBlt() -> myCopyBlt() changes of -r535185:
* that code is Trolltech's and licensed as QPL/GPL (which would infect KolourPaint's BSD)
* I am dropping the copyBlt() code in question anyway
M +6 -15 kppixmapfx.cpp
--- trunk/KDE/kdegraphics/kolourpaint/pixmapfx/kppixmapfx.cpp #536855:536856
@@ -568,16 +568,6 @@
}
-static void myCopyBlt(QPixmap *dst, int dx, int dy,
- const QPixmap *src, int sx, int sy, int sw, int sh)
-{
- QImage image = dst->toImage();
- QPainter p(&image);
- p.setCompositionMode(QPainter::CompositionMode_Source);
- p.drawPixmap(dx, dy, *src, sx, sy, sw, sh);
- *dst = QPixmap::fromImage(image);
-}
-
//
// Get/Set Parts of Pixmap
//
@@ -622,7 +612,7 @@
const QPoint destTopLeft = validSrcRect.topLeft () - rect.topLeft ();
// copy data _and_ mask (if avail)
- myCopyBlt (&retPixmap, /* dest */
+ copyBlt (&retPixmap, /* dest */
destTopLeft.x (), destTopLeft.y (), /* dest pt */
&pm, /* src */
validSrcRect.x (), validSrcRect.y (), /* src pt */
@@ -695,7 +685,7 @@
// Qt bug on boundary case?
// copy data _and_ mask
- myCopyBlt (destPixmapPtr,
+ copyBlt (destPixmapPtr,
destAt.x (), destAt.y (),
&srcPixmap,
0, 0,
@@ -870,6 +860,7 @@
}
}
+
// public static
QBitmap kpPixmapFX::getNonNullMaskAt (const QPixmap &pm, const QRect &rect)
{
@@ -877,7 +868,7 @@
if (!pm.mask ().isNull ())
{
- myCopyBlt (&destMaskBitmap, 0, 0,
+ copyBlt (&destMaskBitmap, 0, 0,
&pm, rect.x (), rect.y (), rect.width (), rect.height ());
}
else
@@ -898,8 +889,8 @@
QBitmap destMaskBitmap (srcMaskBitmap.width (), srcMaskBitmap.height ());
- myCopyBlt (&destMaskBitmap, destAt.x (), destAt.y (),
- &srcMaskBitmap, 0, 0, srcMaskBitmap.width(), srcMaskBitmap.height());
+ copyBlt (&destMaskBitmap, destAt.x (), destAt.y (),
+ &srcMaskBitmap);
destPixmapPtr->setMask (destMaskBitmap);
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic