aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/svg/parser
diff options
context:
space:
mode:
Diffstat (limited to 'src/svg/parser')
-rw-r--r--src/svg/parser/SkSVGSVG.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/svg/parser/SkSVGSVG.cpp b/src/svg/parser/SkSVGSVG.cpp
index fcce62de9e..61ccb3c819 100644
--- a/src/svg/parser/SkSVGSVG.cpp
+++ b/src/svg/parser/SkSVGSVG.cpp
@@ -43,11 +43,8 @@ void SkSVGSVG::translate(SkSVGParser& parser, bool defState) {
if (strcmp(wSuffix, "pt") == 0)
width = SkScalarMulDiv(width, SK_Scalar1 * 72, SK_Scalar1 * 96);
SkParse::FindScalars(f_viewBox.c_str(), viewBox, 4);
- SkRect box;
- box.fLeft = SkScalarDiv(viewBox[0], width);
- box.fTop = SkScalarDiv(viewBox[1], height);
- box.fRight = SkScalarDiv(viewBox[2], width);
- box.fBottom = SkScalarDiv(viewBox[3], height);
+ SkRect box = SkRect::MakeLTRB(viewBox[0] / width, viewBox[1] / height,
+ viewBox[2] / width, viewBox[3] / height);
if (box.fLeft == 0 && box.fTop == 0 &&
box.fRight == SK_Scalar1 && box.fBottom == SK_Scalar1)
return;