From f758c5992759f838a1083d24350f45ffa82a3166 Mon Sep 17 00:00:00 2001 From: David Brittain <websites@paperetto.com> Date: Fri, 28 Mar 2014 13:10:28 -0700 Subject: [PATCH] Fix issue with offset viewport, where content is not correctly located inside the viewport --- Inkpad-Core/SVG/WDSVGParser.m | 1 + 1 file changed, 1 insertion(+) diff --git a/Inkpad-Core/SVG/WDSVGParser.m b/Inkpad-Core/SVG/WDSVGParser.m index 93515fd..9f38c13 100644 --- a/Inkpad-Core/SVG/WDSVGParser.m +++ b/Inkpad-Core/SVG/WDSVGParser.m @@ -197,6 +197,7 @@ - (void) checkViewBox state_.viewBoxTransform = [self preserveAspectRatio:preserve withSize:CGSizeMake(w, h) andBounds:state_.viewport]; state_.viewport = CGRectMake(x, y, w, h); state_.transform = CGAffineTransformConcat(state_.viewBoxTransform, state_.transform); + state_.transform = CGAffineTransformTranslate(state_.transform, -x, -y); } } }