summaryrefslogtreecommitdiffstats
path: root/src/sp-filter.cpp
diff options
context:
space:
mode:
authorShlomi Fish <shlomif@shlomifish.org>2017-10-05 15:34:42 +0000
committerShlomi Fish <shlomif@shlomifish.org>2017-10-05 15:34:42 +0000
commitb4b96eb22c978024da8841f9184b1c7d85140ffd (patch)
treeb3b01e875ab3f237cce27829bdc9b2beaf7daa23 /src/sp-filter.cpp
parentExtract SPDimensions from spuse (diff)
downloadinkscape-b4b96eb22c978024da8841f9184b1c7d85140ffd.tar.gz
inkscape-b4b96eb22c978024da8841f9184b1c7d85140ffd.zip
Extract SPDimensions from spfilters
Diffstat (limited to 'src/sp-filter.cpp')
-rw-r--r--src/sp-filter.cpp20
1 files changed, 1 insertions, 19 deletions
diff --git a/src/sp-filter.cpp b/src/sp-filter.cpp
index 2a5ec0755..aa5fe2942 100644
--- a/src/sp-filter.cpp
+++ b/src/sp-filter.cpp
@@ -213,25 +213,7 @@ void SPFilter::update(SPCtx *ctx, guint flags) {
// Note: This only works for root viewport since this routine is not called after
// setting a new viewport. A true fix requires a strategy like SPItemView or SPMarkerView.
if(this->filterUnits == SP_FILTER_UNITS_USERSPACEONUSE) {
- if (this->x.unit == SVGLength::PERCENT) {
- this->x._set = true;
- this->x.computed = this->x.value * ictx->viewport.width();
- }
-
- if (this->y.unit == SVGLength::PERCENT) {
- this->y._set = true;
- this->y.computed = this->y.value * ictx->viewport.height();
- }
-
- if (this->width.unit == SVGLength::PERCENT) {
- this->width._set = true;
- this->width.computed = this->width.value * ictx->viewport.width();
- }
-
- if (this->height.unit == SVGLength::PERCENT) {
- this->height._set = true;
- this->height.computed = this->height.value * ictx->viewport.height();
- }
+ this->calcDimsFromParentViewport(ictx, true);
}
/* do something to trigger redisplay, updates? */