diff options
| author | Marc Jeanmougin <marc@jeanmougin.fr> | 2017-10-07 16:23:02 +0000 |
|---|---|---|
| committer | Marc Jeanmougin <marc@jeanmougin.fr> | 2017-10-07 16:23:02 +0000 |
| commit | 8ef6761023610724a1e78e8c82cef80fd92827df (patch) | |
| tree | c96e0e7329cca62e5529ea6899d3f5f2a9ee8e53 /src/sp-filter-primitive.cpp | |
| parent | Fix a few draw-geometry-* icons (diff) | |
| parent | Refactoring: avoid duplicate code. (diff) | |
| download | inkscape-8ef6761023610724a1e78e8c82cef80fd92827df.tar.gz inkscape-8ef6761023610724a1e78e8c82cef80fd92827df.zip | |
Merge branch 'refactoring' of gitlab.com:shlomif/inkscape
Diffstat (limited to 'src/sp-filter-primitive.cpp')
| -rw-r--r-- | src/sp-filter-primitive.cpp | 20 |
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); |
