[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-01-24 11:35:17
Message-ID: 1264332917.193459.861.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 1079493 by berger:
* add setters/getters to colors and opacity
* serialize opacity as float
M +1 -1 kis_recorded_bezier_curve_paint_action.cpp
M +36 -1 kis_recorded_paint_action.cpp
M +7 -0 kis_recorded_paint_action.h
M +1 -1 kis_recorded_polyline_paint_action.cpp
--- trunk/koffice/krita/image/recorder/kis_recorded_bezier_curve_paint_action.cpp #1079492:1079493
@@ -151,7 +151,7 @@
QString name = elt.attribute("name");
KisNodeQueryPath pathnode = KisNodeQueryPath::fromString(elt.attribute("path"));
QString paintOpId = elt.attribute("paintop");
- int opacity = elt.attribute("opacity", "100").toInt();
+ int opacity = elt.attribute("opacity", "1.0").toDouble() * 255;
bool paintIncremental = elt.attribute("paintIncremental", "1").toInt();
QString compositeOp = elt.attribute("compositeOp", COMPOSITE_OVER);
--- trunk/koffice/krita/image/recorder/kis_recorded_paint_action.cpp #1079492:1079493
@@ -102,7 +102,7 @@
elt.appendChild(backgroundColorElt);
// Opacity
- elt.setAttribute("opacity", d->opacity);
+ elt.setAttribute("opacity", d->opacity / 255.0);
// paintIncremental
elt.setAttribute("paintIncremental", d->paintIncremental);
@@ -116,6 +116,41 @@
return d->paintOpPreset;
}
+void KisRecordedPaintAction::setPaintOpPreset(KisPaintOpPresetSP preset)
+{
+ d->paintOpPreset = preset;
+}
+
+int KisRecordedPaintAction::opacity() const
+{
+ return d->opacity;
+}
+
+void KisRecordedPaintAction::setOpacity(int opacity)
+{
+ d->opacity = opacity;
+}
+
+KoColor KisRecordedPaintAction::paintColor() const
+{
+ return d->foregroundColor;
+}
+
+void KisRecordedPaintAction::setPaintColor(const KoColor& color)
+{
+ d->foregroundColor = color;
+}
+
+KoColor KisRecordedPaintAction::backgroundColor() const
+{
+ return d->backgroundColor;
+}
+
+void KisRecordedPaintAction::setBackgroundColor(const KoColor& color)
+{
+ d->backgroundColor = color;
+}
+
void KisRecordedPaintAction::play(KisNodeSP node, const KisPlayInfo& info) const
{
Q_UNUSED(node);
--- trunk/koffice/krita/image/recorder/kis_recorded_paint_action.h #1079492:1079493
@@ -60,6 +60,13 @@
public:
KisPaintOpPresetSP paintOpPreset() const;
+ void setPaintOpPreset(KisPaintOpPresetSP preset);
+ int opacity() const;
+ void setOpacity(int );
+ KoColor paintColor() const;
+ void setPaintColor(const KoColor& color);
+ KoColor backgroundColor() const;
+ void setBackgroundColor(const KoColor& color);
private:
struct Private;
--- trunk/koffice/krita/image/recorder/kis_recorded_polyline_paint_action.cpp #1079492:1079493
@@ -120,7 +120,7 @@
QString name = elt.attribute("name");
KisNodeQueryPath pathnode = KisNodeQueryPath::fromString(elt.attribute("path"));
QString paintOpId = elt.attribute("paintop");
- int opacity = elt.attribute("opacity", "100").toInt();
+ int opacity = elt.attribute("opacity", "1.0").toDouble() * 255;
bool paintIncremental = elt.attribute("paintIncremental", "1").toInt();
QString compositeOp = elt.attribute("compositeOp", COMPOSITE_OVER);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic