[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/3.5/kdegraphics/kolourpaint (silent)
From: Clarence Dang <dang () kde ! org>
Date: 2007-10-07 4:46:21
Message-ID: 1191732381.377211.23076.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 722278 by dang:
SVN_SILENT comments, +debug, +TODO
M +1 -1 kpview.cpp
M +5 -2 kpviewmanager.cpp
M +26 -1 pixmapfx/kppixmapfx.cpp
M +1 -0 tools/kptoolrotate.cpp
M +1 -0 tools/kptoolskew.cpp
--- branches/KDE/3.5/kdegraphics/kolourpaint/kpview.cpp #722277:722278
@@ -1469,7 +1469,7 @@
// one with focus // !this->isActiveWindow ()
!vm->activeView ())) // sync: call will break when vm is not held by 1 \
mainWindow {
- // TODO: fix code duplication with kpViewManager::updateTextCursor()
+ // TODO: Fix code duplication: \
kpViewManager::{setTextCursorPosition,updateTextCursor}() & \
kpView::paintEventDrawSelection()
QPoint topLeft = sel->pointForTextRowCol (vm->textCursorRow (), \
vm->textCursorCol ()); if (topLeft != KP_INVALID_POINT)
{
--- branches/KDE/3.5/kdegraphics/kolourpaint/kpviewmanager.cpp #722277:722278
@@ -56,7 +56,7 @@
m_selectionBorderVisible (false),
m_selectionBorderFinished (false)
{
- m_queueUpdatesCounter = m_fastUpdatesCounter = 0;
+ m_queueUpdatesCounter = m_fastUpdatesCounter = 0;
}
// private
@@ -233,6 +233,7 @@
this, SLOT (slotTextCursorBlink ()));
slotTextCursorBlink ();
}
+ // TODO: What if !yes - shouldn't it clear the cursor?
restoreQueueUpdates ();
restoreFastUpdates ();
@@ -351,6 +352,7 @@
if (m_viewUnderCursor)
{
+ // TODO: Fix code duplication: \
kpViewManager::{setTextCursorPosition,updateTextCursor}() & \
kpView::paintEventDrawSelection()
QPoint topLeft = sel->pointForTextRowCol (m_textCursorRow, \
m_textCursorCol); if (topLeft != KP_INVALID_POINT)
{
@@ -395,7 +397,7 @@
if (!sel || !sel->isText ())
return;
- // TODO: fix code duplication with kpView::paintEventDrawSelection()
+ // TODO: Fix code duplication: \
kpViewManager::{setTextCursorPosition,updateTextCursor}() & \
kpView::paintEventDrawSelection()
QPoint topLeft = sel->pointForTextRowCol (m_textCursorRow, m_textCursorCol);
if (topLeft != KP_INVALID_POINT)
{
@@ -749,3 +751,4 @@
}
#include <kpviewmanager.moc>
+
--- branches/KDE/3.5/kdegraphics/kolourpaint/pixmapfx/kppixmapfx.cpp #722277:722278
@@ -1237,7 +1237,21 @@
static QWMatrix matrixWithZeroOrigin (const QWMatrix &matrix, int width, int height)
{
+#if DEBUG_KP_PIXMAP_FX
+ kdDebug () << "matrixWithZeroOrigin(w=" << width << ",h=" << height << ")" << \
endl; + kdDebug () << "\tmatrix: m11=" << matrix.m11 ()
+ << " m12=" << matrix.m12 ()
+ << " m21=" << matrix.m21 ()
+ << " m22=" << matrix.m22 ()
+ << " dx=" << matrix.dx ()
+ << " dy=" << matrix.dy ()
+ << endl;
+#endif
+ // TODO: Should we be using QWMatrix::Areas?
QRect newRect = matrix.mapRect (QRect (0, 0, width, height));
+#if DEBUG_KP_PIXMAP_FX
+ kdDebug () << "\tnewRect=" << newRect << endl;
+#endif
QWMatrix translatedMatrix (matrix.m11 (), matrix.m12 (), matrix.m21 (), \
matrix.m22 (),
matrix.dx () - newRect.left (), matrix.dy () - \
newRect.top ()); @@ -1258,6 +1272,7 @@
<< ")"
<< endl;
#endif
+ // TODO: Should we be using QWMatrix::Areas?
QRect newRect = transformMatrix.map (pm.rect ());
#if DEBUG_KP_PIXMAP_FX && 1
kdDebug () << "\tmappedRect=" << newRect << endl;
@@ -1332,6 +1347,7 @@
transformMatrix = transformMatrix * scaleMatrix;
+ // TODO: Should we be using QWMatrix::Areas?
newRect = transformMatrix.map (pm.rect ());
#if DEBUG_KP_PIXMAP_FX && 1
kdDebug () << "\tnewRect after targetWidth,targetHeight adjust=" << newRect \
<< endl; @@ -1366,7 +1382,7 @@
}
QPainter painter (&newPixmap);
-#if DEBUG_KP_PIXMAP_FX && 0
+#if DEBUG_KP_PIXMAP_FX && 1
kdDebug () << "\tmatrix: m11=" << transformMatrix.m11 ()
<< " m12=" << transformMatrix.m12 ()
<< " m21=" << transformMatrix.m21 ()
@@ -1374,6 +1390,15 @@
<< " dx=" << transformMatrix.dx ()
<< " dy=" << transformMatrix.dy ()
<< endl;
+ const QWMatrix trueMatrix = QPixmap::trueMatrix (transformMatrix,
+ pm.width (), pm.height ());
+ kdDebug () << "\ttrue matrix: m11=" << trueMatrix.m11 ()
+ << " m12=" << trueMatrix.m12 ()
+ << " m21=" << trueMatrix.m21 ()
+ << " m22=" << trueMatrix.m22 ()
+ << " dx=" << trueMatrix.dx ()
+ << " dy=" << trueMatrix.dy ()
+ << endl;
#endif
painter.setWorldMatrix (transformMatrix);
#if DEBUG_KP_PIXMAP_FX && 0
--- branches/KDE/3.5/kdegraphics/kolourpaint/tools/kptoolrotate.cpp #722277:722278
@@ -409,6 +409,7 @@
QSize kpToolRotateDialog::newDimensions () const
{
QWMatrix matrix = kpPixmapFX::rotateMatrix (m_oldWidth, m_oldHeight, angle ());
+ // TODO: Should we be using QWMatrix::Areas?
QRect rect = matrix.map (QRect (0, 0, m_oldWidth, m_oldHeight));
return rect.size ();
}
--- branches/KDE/3.5/kdegraphics/kolourpaint/tools/kptoolskew.cpp #722277:722278
@@ -310,6 +310,7 @@
QWMatrix skewMatrix = kpPixmapFX::skewMatrix (*doc->pixmap (),
horizontalAngleForPixmapFX (),
verticalAngleForPixmapFX ());
+ // TODO: Should we be using QWMatrix::Areas?
QRect skewRect = skewMatrix.mapRect (doc->rect (m_actOnSelection));
return QSize (skewRect.width (), skewRect.height ());
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic