[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [calligra/krita-texturizer_option-rempt] krita/plugins/paintops/libpaintop: The texture option now a
From:       Boudewijn Rempt <boud () valdyas ! org>
Date:       2012-03-23 11:40:46
Message-ID: 20120323114046.BBBB5A60A9 () git ! kde ! org
[Download RAW message or body]

Git commit 97a3c3b22483ff4c97f374aed64a99cfc9a0bd64 by Boudewijn Rempt.
Committed on 21/03/2012 at 21:50.
Pushed by rempt into branch 'krita-texturizer_option-rempt'.

The texture option now actually paints the texture

I'm not getting the effect in \
http://www.davidrevoy.com/index.php?article107/textured-brush-in-floss-digital-painting,
 though -- not sure what's the difference.

M  +5    -11   krita/plugins/paintops/libpaintop/kis_texture_option.cpp

http://commits.kde.org/calligra/97a3c3b22483ff4c97f374aed64a99cfc9a0bd64

diff --git a/krita/plugins/paintops/libpaintop/kis_texture_option.cpp \
b/krita/plugins/paintops/libpaintop/kis_texture_option.cpp index d3f7537..2b7cc8d \
                100644
--- a/krita/plugins/paintops/libpaintop/kis_texture_option.cpp
+++ b/krita/plugins/paintops/libpaintop/kis_texture_option.cpp
@@ -269,8 +269,6 @@ void KisTextureProperties::recalculateMask()
         }
         iter->nextRow();
     }
-
-    m_mask->convertToQImage(0).save(QString("converted_mask_%1.png").arg(i));
     i++;
 
 }
@@ -333,23 +331,19 @@ void KisTextureProperties::apply(KisFixedPaintDeviceSP dab, \
const QPoint &offset  
     KisFillPainter fillPainter(fillDevice);
     fillPainter.fillRect(x, y, rect.width(), rect.height(), m_mask, bounds);
+    fillPainter.end();
 
-    fillDevice->setX(0);
-    fillDevice->setY(0);
-
-    fillDevice->convertToQImage(0).save(QString("%1_fill_device.png").arg(i));
+    quint8 *dabData = dab->data();
 
-    KisHLineConstIteratorSP iter = fillDevice->createHLineConstIteratorNG(0, 0, \
rect.width()); +    KisHLineIteratorSP iter = fillDevice->createHLineIteratorNG(x, y, \
rect.width());  for (int row = 0; row < rect.height(); ++row) {
         for (int col = 0; col < rect.width(); ++col) {
-            dab->colorSpace()->setOpacity(dab->data() + (row * rect.width() + col), \
*iter->oldRawData(), 1); +            dab->colorSpace()->multiplyAlpha(dabData, \
*iter->oldRawData(), 1);  iter->nextPixel();
+            dabData += dab->pixelSize();
         }
         iter->nextRow();
     }
 
-    dab->convertToQImage(0).save(QString("%1_masked_dab.png").arg(i));
-
-    i++;
 }
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic