Skip to content
Browse files

cast to double

  • Loading branch information...
1 parent 077b952 commit 723b5b242c1d28a3e9c37559e2e79e470054e86b reed@google.com committed Feb 16, 2012
Showing with 8 additions and 8 deletions.
  1. +4 −4 svg/SkSVGCircle.cpp
  2. +4 −4 svg/SkSVGEllipse.cpp
View
8 svg/SkSVGCircle.cpp
@@ -33,13 +33,13 @@ void SkSVGCircle::translate(SkSVGParser& parser, bool defState) {
right = cx + r;
bottom = cy + r;
char scratch[16];
- sprintf(scratch, "%g", left);
+ sprintf(scratch, "%g", SkScalarToDouble(left));
parser._addAttribute("left", scratch);
- sprintf(scratch, "%g", top);
+ sprintf(scratch, "%g", SkScalarToDouble(top));
parser._addAttribute("top", scratch);
- sprintf(scratch, "%g", right);
+ sprintf(scratch, "%g", SkScalarToDouble(right));
parser._addAttribute("right", scratch);
- sprintf(scratch, "%g", bottom);
+ sprintf(scratch, "%g", SkScalarToDouble(bottom));
parser._addAttribute("bottom", scratch);
parser._endElement();
}
View
8 svg/SkSVGEllipse.cpp
@@ -35,13 +35,13 @@ void SkSVGEllipse::translate(SkSVGParser& parser, bool defState) {
right = cx + rx;
bottom = cy + ry;
char scratch[16];
- sprintf(scratch, "%g", left);
+ sprintf(scratch, "%g", SkScalarToDouble(left));
parser._addAttribute("left", scratch);
- sprintf(scratch, "%g", top);
+ sprintf(scratch, "%g", SkScalarToDouble(top));
parser._addAttribute("top", scratch);
- sprintf(scratch, "%g", right);
+ sprintf(scratch, "%g", SkScalarToDouble(right));
parser._addAttribute("right", scratch);
- sprintf(scratch, "%g", bottom);
+ sprintf(scratch, "%g", SkScalarToDouble(bottom));
parser._addAttribute("bottom", scratch);
parser._endElement();
}

0 comments on commit 723b5b2

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