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-image.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-image.cpp')
| -rw-r--r-- | src/sp-image.cpp | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/src/sp-image.cpp b/src/sp-image.cpp index 1961971cb..6736efdec 100644 --- a/src/sp-image.cpp +++ b/src/sp-image.cpp @@ -374,23 +374,8 @@ void SPImage::update(SPCtx *ctx, unsigned int flags) { } } - // Calculate x, y, width, height from parent/initial viewport, see sp-root.cpp - if (this->x.unit == SVGLength::PERCENT) { - this->x.computed = this->x.value * ictx->viewport.width(); - } - - if (this->y.unit == SVGLength::PERCENT) { - this->y.computed = this->y.value * ictx->viewport.height(); - } - - if (this->width.unit == SVGLength::PERCENT) { - this->width.computed = this->width.value * ictx->viewport.width(); - } - - if (this->height.unit == SVGLength::PERCENT) { - this->height.computed = this->height.value * ictx->viewport.height(); - } + this->calcDimsFromParentViewport(ictx); // Image creates a new viewport ictx->viewport= Geom::Rect::from_xywh( this->x.computed, this->y.computed, |
