[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/3.5/kdegraphics/kolourpaint
From: Clarence Dang <dang () kde ! org>
Date: 2007-10-06 12:37:57
Message-ID: 1191674277.229978.19522.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 722007 by dang:
* Paste transparent pixels as white instead of uninitialized colors,
when the app does not support pasting transparent pixels (such as
OpenOffice.org)
M +5 -1 NEWS
M +19 -2 kpmainwindow_edit.cpp
--- branches/KDE/3.5/kdegraphics/kolourpaint/NEWS #722006:722007
@@ -2,8 +2,12 @@
KolourPaint 1.4_relight Series (branches/KDE/3.5/)
===============================
-KolourPaint 1.4.8_relight (Frozen ???)
+KolourPaint 1.4.8_relight (Frozen 2007-10-07)
+ * Paste transparent pixels as white instead of uninitialized colors,
+ when the app does not support pasting transparent pixels (such as
+ OpenOffice.org)
+
* Add error dialogs for:
- if scanning support is unavailable
- running out of graphics memory during a scan
--- branches/KDE/3.5/kdegraphics/kolourpaint/kpmainwindow_edit.cpp #722006:722007
@@ -245,8 +245,25 @@
}
else
{
- if (!sel.pixmap ())
- sel.setPixmap (m_document->getSelectedPixmap ());
+ QPixmap rawPixmap;
+
+ if (sel.pixmap ())
+ rawPixmap = *sel.pixmap ();
+ else
+ rawPixmap = m_document->getSelectedPixmap ();
+
+ // Some apps, such as OpenOffice.org 2.0.4, ignore the image mask
+ // when pasting. For transparent pixels, the uninitialized RGB
+ // values are used. Fix this by initializing those values to a
+ // neutral color -- white.
+ //
+ // Strangely enough, OpenOffice.org respects the mask when inserting
+ // an image from a file, as opposed to pasting one from the clipbaord.
+ sel.setPixmap (
+ kpPixmapFX::pixmapWithDefinedTransparentPixels (
+ rawPixmap,
+ Qt::white)); // CONFIG
+
QApplication::clipboard ()->setData (new kpSelectionDrag (sel),
QClipboard::Clipboard);
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic