summaryrefslogtreecommitdiffstats
path: root/src/spray-context.cpp
diff options
context:
space:
mode:
authorMarkus Engel <markus.engel@tum.de>2013-04-21 21:58:15 +0000
committerMarkus Engel <markus.engel@tum.de>2013-04-21 21:58:15 +0000
commitbdde74bbab299f2ee448f1c55469c56a66fb01f7 (patch)
tree45bccef1ec815708f9b54171e2d567344f155074 /src/spray-context.cpp
parentMore cleaning. (diff)
downloadinkscape-bdde74bbab299f2ee448f1c55469c56a66fb01f7.tar.gz
inkscape-bdde74bbab299f2ee448f1c55469c56a66fb01f7.zip
Removed some unused files; more refactoring in EventContext tree.
(bzr r11608.1.104)
Diffstat (limited to 'src/spray-context.cpp')
-rw-r--r--src/spray-context.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/spray-context.cpp b/src/spray-context.cpp
index 9c4a22053..8bedb237b 100644
--- a/src/spray-context.cpp
+++ b/src/spray-context.cpp
@@ -282,38 +282,38 @@ void SPSprayContext::setup() {
}
}
-void SPSprayContext::set(Inkscape::Preferences::Entry* val) {
+void SPSprayContext::set(const Inkscape::Preferences::Entry& val) {
SPEventContext* ec = this;
SPSprayContext *tc = SP_SPRAY_CONTEXT(ec);
- Glib::ustring path = val->getEntryName();
+ Glib::ustring path = val.getEntryName();
if (path == "mode") {
- tc->mode = val->getInt();
+ tc->mode = val.getInt();
sp_spray_update_cursor(tc, false);
} else if (path == "width") {
- tc->width = 0.01 * CLAMP(val->getInt(10), 1, 100);
+ tc->width = 0.01 * CLAMP(val.getInt(10), 1, 100);
} else if (path == "usepressure") {
- tc->usepressure = val->getBool();
+ tc->usepressure = val.getBool();
} else if (path == "population") {
- tc->population = 0.01 * CLAMP(val->getInt(10), 1, 100);
+ tc->population = 0.01 * CLAMP(val.getInt(10), 1, 100);
} else if (path == "rotation_variation") {
- tc->rotation_variation = CLAMP(val->getDouble(0.0), 0, 100.0);
+ tc->rotation_variation = CLAMP(val.getDouble(0.0), 0, 100.0);
} else if (path == "scale_variation") {
- tc->scale_variation = CLAMP(val->getDouble(1.0), 0, 100.0);
+ tc->scale_variation = CLAMP(val.getDouble(1.0), 0, 100.0);
} else if (path == "standard_deviation") {
- tc->standard_deviation = 0.01 * CLAMP(val->getInt(10), 1, 100);
+ tc->standard_deviation = 0.01 * CLAMP(val.getInt(10), 1, 100);
} else if (path == "mean") {
- tc->mean = 0.01 * CLAMP(val->getInt(10), 1, 100);
+ tc->mean = 0.01 * CLAMP(val.getInt(10), 1, 100);
// Not implemented in the toolbar and preferences yet
} else if (path == "distribution") {
- tc->distrib = val->getInt(1);
+ tc->distrib = val.getInt(1);
} else if (path == "tilt") {
- tc->tilt = CLAMP(val->getDouble(0.1), 0, 1000.0);
+ tc->tilt = CLAMP(val.getDouble(0.1), 0, 1000.0);
} else if (path == "ratio") {
- tc->ratio = CLAMP(val->getDouble(), 0.0, 0.9);
+ tc->ratio = CLAMP(val.getDouble(), 0.0, 0.9);
} else if (path == "force") {
- tc->force = CLAMP(val->getDouble(1.0), 0, 1.0);
+ tc->force = CLAMP(val.getDouble(1.0), 0, 1.0);
}
}