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

List:       kde-commits
Subject:    koffice/krita/image/recorder
From:       Cyrille Berger <cyb () lepi ! org>
Date:       2010-02-06 8:35:22
Message-ID: 1265445322.180980.21499.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1085924 by berger:

add setter on the paint action for stroke/fill styles, pattern, gradient
and generator


 M  +41 -0     kis_recorded_paint_action.cpp  
 M  +6 -0      kis_recorded_paint_action.h  


--- trunk/koffice/krita/image/recorder/kis_recorded_paint_action.cpp #1085923:1085924
@@ -50,6 +50,11 @@
     int opacity;
     bool paintIncremental;
     QString compositeOp;
+    KisPainter::StrokeStyle strokeStyle;
+    KisPainter::FillStyle fillStyle;
+    const KisPattern* pattern;
+    const KoAbstractGradient* gradient;
+    const KisFilterConfiguration* generator;
 };
 
 KisRecordedPaintAction::KisRecordedPaintAction(const QString & id,
@@ -64,6 +69,11 @@
     d->opacity = 100;
     d->paintIncremental = true;
     d->compositeOp = COMPOSITE_OVER;
+    d->strokeStyle = KisPainter::StrokeStyleBrush;
+    d->fillStyle = KisPainter::FillStyleNone;
+    d->pattern = 0;
+    d->gradient = 0;
+    d->generator = 0;
 }
 
 KisRecordedPaintAction::KisRecordedPaintAction(const KisRecordedPaintAction& rhs) : \
KisRecordedAction(rhs), d(new Private(*rhs.d)) @@ -160,6 +170,31 @@
     d->paintIncremental = v;
 }
 
+void KisRecordedPaintAction::setStrokeStyle(KisPainter::StrokeStyle strokeStyle)
+{
+  d->strokeStyle = strokeStyle;
+}
+
+void KisRecordedPaintAction::setFillStyle(KisPainter::FillStyle fillStyle)
+{
+  d->fillStyle = fillStyle;
+}
+
+void KisRecordedPaintAction::setPattern(const KisPattern* pattern)
+{
+  d->pattern = pattern;
+}
+
+void KisRecordedPaintAction::setGradient(const KoAbstractGradient* gradient)
+{
+  d->gradient = gradient;
+}
+
+void KisRecordedPaintAction::setGenerator(const KisFilterConfiguration * generator)
+{
+  d->generator = generator;
+}
+
 void KisRecordedPaintAction::play(KisNodeSP node, const KisPlayInfo& info) const
 {
     Q_UNUSED(node);
@@ -195,6 +230,12 @@
         d->paintOpPreset->settings()->setNode(node);
         painter.setPaintOpPreset(d->paintOpPreset, info.image());
 
+        painter.setStrokeStyle(d->strokeStyle);
+        painter.setFillStyle(d->fillStyle);
+        painter.setPattern(d->pattern);
+        painter.setGradient(d->gradient);
+        painter.setGenerator(d->generator);
+        
         playPaint(info, &painter);
 
         if (!d->paintIncremental) {
--- trunk/koffice/krita/image/recorder/kis_recorded_paint_action.h #1085923:1085924
@@ -21,6 +21,7 @@
 
 #include "recorder/kis_recorded_action.h"
 #include "kis_types.h"
+#include "kis_painter.h"
 
 class KisPaintInformation;
 class KisPainter;
@@ -65,6 +66,11 @@
     QString compositeOp();
     void setCompositeOp(const QString& );
     void setPaintIncremental(bool );
+    void setStrokeStyle(KisPainter::StrokeStyle );
+    void setFillStyle(KisPainter::FillStyle );
+    void setPattern(const KisPattern* );
+    void setGradient(const KoAbstractGradient* gradient);
+    void setGenerator(const KisFilterConfiguration * generator);
 private:
 
     struct Private;


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

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