From b4b96eb22c978024da8841f9184b1c7d85140ffd Mon Sep 17 00:00:00 2001 From: Shlomi Fish Date: Thu, 5 Oct 2017 18:34:42 +0300 Subject: Extract SPDimensions from spfilters --- src/sp-filter-primitive.cpp | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) (limited to 'src/sp-filter-primitive.cpp') 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); -- cgit v1.2.3