[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdegraphics/kolourpaint (silent)
From: Clarence Dang <dang () kde ! org>
Date: 2007-10-13 2:40:42
Message-ID: 1192243242.122124.15908.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 724698 by dang:
SVN_SILENT comments
M +1 -1 document/kpDocument_Selection.cpp
M +1 -2 layers/selections/image/kpFreeFormImageSelection.cpp
M +4 -3 layers/selections/text/kpTextSelection_Paint.cpp
M +2 -0 pixmapfx/kpPixmapFX_DrawRasterOps.cpp
M +2 -2 pixmapfx/kpPixmapFX_MaskOps.cpp
M +3 -2 pixmapfx/kpPixmapFX_Transforms.cpp
M +4 -4 widgets/toolbars/options/kpToolWidgetBrush.cpp
M +0 -2 widgets/toolbars/options/kpToolWidgetSpraycanSize.cpp
--- trunk/KDE/kdegraphics/kolourpaint/document/kpDocument_Selection.cpp \
#724697:724698 @@ -219,7 +219,7 @@
// Fill opaque bits of the hole in the document
//
- // TODO: this assumes backgroundColor == sel->transparency ().transparentColor()
+ // REFACTOR: this assumes backgroundColor == imageSel->transparency \
().transparentColor() const kpImage selTransparentImage = imageSel->transparentImage \
();
if (backgroundColor.isOpaque ())
--- trunk/KDE/kdegraphics/kolourpaint/layers/selections/image/kpFreeFormImageSelection.cpp \
#724697:724698 @@ -32,7 +32,6 @@
#include <kpFreeFormImageSelection.h>
#include <QBitmap>
-#include <QPainter>
#include <KDebug>
@@ -293,7 +292,7 @@
// Having said that, this is probably the safest option as region shifting
// is dodgy. Also, this would guarantee that shapeBitmap() and shapeRegion()
// are consistent and we wouldn't need cardinally adjacent points either
- // (d->cardPoints*Cache).
+ // (d->cardPointsCache and d->cardPointsLoopCache).
const QRegion regionX = region.translated (1, 0);
const QRegion regionY = region.translated (0, 1);
const QRegion regionXY = region.translated (1, 1);
--- trunk/KDE/kdegraphics/kolourpaint/layers/selections/text/kpTextSelection_Paint.cpp \
#724697:724698 @@ -105,9 +105,10 @@
// layer anyway.
// 2. More importantly, since QPainter::drawText() draws the same text
// with the same font differently on the RGB and mask layers, we don't
- // draw on the RGB layer to avoid artifacts. TODO: Don't the shape
- // drawing methods have to worry about this too? Why not centralize
- // this in draw()?
+ // draw on the RGB layer to avoid artifacts.
+ // TODO: Don't the shape drawing methods have to worry about this too?
+ // Later: Yes they do, see kpPixmapFX::draw_ToQColor().
+ // Why not centralize this in draw()?
if (!(drawingOnRGBLayer && pack->textStyle.foregroundColor ().isTransparent ()))
{
p->setClipRect (pack->wholeAreaRect);
--- trunk/KDE/kdegraphics/kolourpaint/pixmapfx/kpPixmapFX_DrawRasterOps.cpp \
#724697:724698 @@ -161,6 +161,8 @@
return;
}
+ // -1's compensate for Qt4's 1 pixel higher and wider
+ // QPainter::drawRect().
p.drawRect (x, y, width - 1, height - 1);
}
--- trunk/KDE/kdegraphics/kolourpaint/pixmapfx/kpPixmapFX_MaskOps.cpp #724697:724698
@@ -233,8 +233,8 @@
if (kpPixmapFX::hasAlphaChannel (*destPixmapPtr))
{
// We need to change <destPixmapPtr> from 32-bit (RGBA
- // i.e. hasAlphaChannel() returns true regardless of whether the
- // channel has any content, causing trouble later on) to 24-bit
+ // i.e. hasAlphaChannel() returns true -- regardless of whether the
+ // channel has any actual content -- which causes trouble) to 24-bit
// (RGB with possible mask).
//
// "destPixmapPtr->setMask (destPixmapPtr->mask())" is not
--- trunk/KDE/kdegraphics/kolourpaint/pixmapfx/kpPixmapFX_Transforms.cpp \
#724697:724698 @@ -261,8 +261,9 @@
// QPixmap::trueMatrix() returns 27.
//
// You should use the returned matrix to map points accurately (e.g. selection
-// borders). For QPainter::drawPixmap() + setWorldMatrix() rendering accuracy,
-// pass the returned matrix through QPixmap::trueMatrix() and use that.
+// borders). For QPainter::drawPixmap()/drawImage() + setWorldMatrix()
+// rendering accuracy, pass the returned matrix through QPixmap::trueMatrix()
+// and use that.
//
// TODO: If you put the flipMatrix() of tests/transforms.png through this,
// the output is the same as QPixmap::trueMatrix(): <dy> is one off
--- trunk/KDE/kdegraphics/kolourpaint/widgets/toolbars/options/kpToolWidgetBrush.cpp \
#724697:724698 @@ -79,14 +79,14 @@
case 0:
kpPainter::drawEllipse (destImage,
topLeft.x (), topLeft.y (), size, size,
- pack->color/*color*/, 1/*width*/,
+ pack->color/*color*/, 1/*pen width*/,
pack->color/*fill color*/);
break;
case 1:
kpPainter::drawRect (destImage,
topLeft.x (), topLeft.y (), size, size,
- pack->color/*color*/, 1/*width*/,
+ pack->color/*color*/, 1/*pen width*/,
pack->color/*fill color*/);
break;
@@ -94,14 +94,14 @@
kpPainter::drawLine (destImage,
topLeft.x () + size - 1, topLeft.y (),
topLeft.x (), topLeft.y () + size - 1,
- pack->color, 1/*width*/);
+ pack->color, 1/*pen width*/);
break;
case 3:
kpPainter::drawLine (destImage,
topLeft.x (), topLeft.y (),
topLeft.x () + size - 1, topLeft.y () + size - 1,
- pack->color, 1/*width*/);
+ pack->color, 1/*pen width*/);
break;
default:
--- trunk/KDE/kdegraphics/kolourpaint/widgets/toolbars/options/kpToolWidgetSpraycanSize.cpp \
#724697:724698 @@ -61,8 +61,6 @@
kDebug () << "\ticonName=" << iconName;
#endif
- // Ported to Qt4.
-
QPixmap pixmap (s, s);
pixmap.fill (Qt::white);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic