summaryrefslogtreecommitdiffstats
path: root/src/sp-filter-primitive.cpp
diff options
context:
space:
mode:
authorJabier Arraiza <jabier.arraiza@marker.es>2017-11-03 00:10:02 +0000
committerJabier Arraiza <jabier.arraiza@marker.es>2017-11-03 00:10:02 +0000
commitd2df0412f728dd5bb54537dfdfe7c35b34d40e0e (patch)
treee2703384779e83312c456399999997fcc289c5cf /src/sp-filter-primitive.cpp
parentMerge branch 'master' into powerpencil (diff)
parentchange assignment to equality (diff)
downloadinkscape-d2df0412f728dd5bb54537dfdfe7c35b34d40e0e.tar.gz
inkscape-d2df0412f728dd5bb54537dfdfe7c35b34d40e0e.zip
Merge branch 'master' into powerpencil
Diffstat (limited to 'src/sp-filter-primitive.cpp')
-rw-r--r--src/sp-filter-primitive.cpp20
1 files changed, 1 insertions, 19 deletions
diff --git a/src/sp-filter-primitive.cpp b/src/sp-filter-primitive.cpp
index 0fbeed15b..7ced52e11 100644
--- a/src/sp-filter-primitive.cpp
+++ b/src/sp-filter-primitive.cpp
@@ -139,25 +139,7 @@ void SPFilterPrimitive::update(SPCtx *ctx, guint flags) {
SPFilter *parent = SP_FILTER(this->parent);
if( parent->primitiveUnits == 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);
}
SPObject::update(ctx, flags);