summaryrefslogtreecommitdiffstats
path: root/src/sp-image.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-image.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-image.cpp')
-rw-r--r--src/sp-image.cpp17
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,