Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

cast to double

  • Loading branch information...
commit 723b5b242c1d28a3e9c37559e2e79e470054e86b 1 parent 077b952
reed@google.com authored

Showing 2 changed files with 8 additions and 8 deletions. Show diff stats Hide diff stats

  1. +4 4 svg/SkSVGCircle.cpp
  2. +4 4 svg/SkSVGEllipse.cpp
8 svg/SkSVGCircle.cpp
@@ -33,13 +33,13 @@ void SkSVGCircle::translate(SkSVGParser& parser, bool defState) {
33 33 right = cx + r;
34 34 bottom = cy + r;
35 35 char scratch[16];
36   - sprintf(scratch, "%g", left);
  36 + sprintf(scratch, "%g", SkScalarToDouble(left));
37 37 parser._addAttribute("left", scratch);
38   - sprintf(scratch, "%g", top);
  38 + sprintf(scratch, "%g", SkScalarToDouble(top));
39 39 parser._addAttribute("top", scratch);
40   - sprintf(scratch, "%g", right);
  40 + sprintf(scratch, "%g", SkScalarToDouble(right));
41 41 parser._addAttribute("right", scratch);
42   - sprintf(scratch, "%g", bottom);
  42 + sprintf(scratch, "%g", SkScalarToDouble(bottom));
43 43 parser._addAttribute("bottom", scratch);
44 44 parser._endElement();
45 45 }
8 svg/SkSVGEllipse.cpp
@@ -35,13 +35,13 @@ void SkSVGEllipse::translate(SkSVGParser& parser, bool defState) {
35 35 right = cx + rx;
36 36 bottom = cy + ry;
37 37 char scratch[16];
38   - sprintf(scratch, "%g", left);
  38 + sprintf(scratch, "%g", SkScalarToDouble(left));
39 39 parser._addAttribute("left", scratch);
40   - sprintf(scratch, "%g", top);
  40 + sprintf(scratch, "%g", SkScalarToDouble(top));
41 41 parser._addAttribute("top", scratch);
42   - sprintf(scratch, "%g", right);
  42 + sprintf(scratch, "%g", SkScalarToDouble(right));
43 43 parser._addAttribute("right", scratch);
44   - sprintf(scratch, "%g", bottom);
  44 + sprintf(scratch, "%g", SkScalarToDouble(bottom));
45 45 parser._addAttribute("bottom", scratch);
46 46 parser._endElement();
47 47 }

0 comments on commit 723b5b2

Please sign in to comment.
Something went wrong with that request. Please try again.