diff options
| author | Krzysztof Kosi??ski <tweenk.pl@gmail.com> | 2011-08-27 14:58:22 +0000 |
|---|---|---|
| committer | Krzysztof Kosinski <tweenk.pl@gmail.com> | 2011-08-27 14:58:22 +0000 |
| commit | 24526cceccb4ed103a6324756476c64efb3fb5dd (patch) | |
| tree | 24abb1d2b1bdb6156a83f2d393cbdc4747fda4ac /src/sp-use.cpp | |
| parent | Remove NRRect from paint servers and temporary calculations (diff) | |
| download | inkscape-24526cceccb4ed103a6324756476c64efb3fb5dd.tar.gz inkscape-24526cceccb4ed103a6324756476c64efb3fb5dd.zip | |
Remove all NRRect use.
(bzr r10582.1.5)
Diffstat (limited to 'src/sp-use.cpp')
| -rw-r--r-- | src/sp-use.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/sp-use.cpp b/src/sp-use.cpp index 057c01ef1..04cf1eb2c 100644 --- a/src/sp-use.cpp +++ b/src/sp-use.cpp @@ -594,21 +594,18 @@ sp_use_update(SPObject *object, SPCtx *ctx, unsigned flags) /* Set up child viewport */ if (use->x.unit == SVGLength::PERCENT) { - use->x.computed = use->x.value * (ictx->vp.x1 - ictx->vp.x0); + use->x.computed = use->x.value * ictx->viewport.width(); } if (use->y.unit == SVGLength::PERCENT) { - use->y.computed = use->y.value * (ictx->vp.y1 - ictx->vp.y0); + use->y.computed = use->y.value * ictx->viewport.height(); } if (use->width.unit == SVGLength::PERCENT) { - use->width.computed = use->width.value * (ictx->vp.x1 - ictx->vp.x0); + use->width.computed = use->width.value * ictx->viewport.width(); } if (use->height.unit == SVGLength::PERCENT) { - use->height.computed = use->height.value * (ictx->vp.y1 - ictx->vp.y0); + use->height.computed = use->height.value * ictx->viewport.height(); } - cctx.vp.x0 = 0.0; - cctx.vp.y0 = 0.0; - cctx.vp.x1 = use->width.computed; - cctx.vp.y1 = use->height.computed; + cctx.viewport = Geom::Rect::from_xywh(0, 0, use->width.computed, use->height.computed); cctx.i2vp = Geom::identity(); flags&=~SP_OBJECT_USER_MODIFIED_FLAG_B; |
