summaryrefslogtreecommitdiffstats
path: root/src/tweak-context.cpp
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-07-13 20:16:51 +0000
committerTed Gould <ted@gould.cx>2010-07-13 20:16:51 +0000
commitef2d72d29fce61231bdd7888ab8330503158e9d6 (patch)
tree4685bfddef010181fdd87fc182016b994f2b69d9 /src/tweak-context.cpp
parentPulling in a more recent trunk (diff)
parentTranslations. Romanian nsh file update. (diff)
downloadinkscape-ef2d72d29fce61231bdd7888ab8330503158e9d6.tar.gz
inkscape-ef2d72d29fce61231bdd7888ab8330503158e9d6.zip
Upgrading to trunk
(bzr r8254.1.57)
Diffstat (limited to 'src/tweak-context.cpp')
-rw-r--r--src/tweak-context.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/tweak-context.cpp b/src/tweak-context.cpp
index 13299b5a4..904d0cb23 100644
--- a/src/tweak-context.cpp
+++ b/src/tweak-context.cpp
@@ -837,20 +837,24 @@ tweak_colors_in_gradient (SPItem *item, bool fill_or_stroke,
// Normalize pos to 0..1, taking into accound gradient spread:
double pos_e = pos;
- if (gradient->spread == SP_GRADIENT_SPREAD_PAD) {
- if (pos > 1)
+ if (gradient->getSpread() == SP_GRADIENT_SPREAD_PAD) {
+ if (pos > 1) {
pos_e = 1;
- if (pos < 0)
+ }
+ if (pos < 0) {
pos_e = 0;
- } else if (gradient->spread == SP_GRADIENT_SPREAD_REPEAT) {
- if (pos > 1 || pos < 0)
+ }
+ } else if (gradient->getSpread() == SP_GRADIENT_SPREAD_REPEAT) {
+ if (pos > 1 || pos < 0) {
pos_e = pos - floor(pos);
- } else if (gradient->spread == SP_GRADIENT_SPREAD_REFLECT) {
+ }
+ } else if (gradient->getSpread() == SP_GRADIENT_SPREAD_REFLECT) {
if (pos > 1 || pos < 0) {
bool odd = ((int)(floor(pos)) % 2 == 1);
pos_e = pos - floor(pos);
- if (odd)
+ if (odd) {
pos_e = 1 - pos_e;
+ }
}
}