Skip to content
This repository has been archived by the owner on Jun 19, 2018. It is now read-only.

Commit

Permalink
cast to double
Browse files Browse the repository at this point in the history
  • Loading branch information
reed@google.com committed Feb 16, 2012
1 parent 077b952 commit 723b5b2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions svg/SkSVGCircle.cpp
Expand Up @@ -33,13 +33,13 @@ void SkSVGCircle::translate(SkSVGParser& parser, bool defState) {
right = cx + r; right = cx + r;
bottom = cy + r; bottom = cy + r;
char scratch[16]; char scratch[16];
sprintf(scratch, "%g", left); sprintf(scratch, "%g", SkScalarToDouble(left));
parser._addAttribute("left", scratch); parser._addAttribute("left", scratch);
sprintf(scratch, "%g", top); sprintf(scratch, "%g", SkScalarToDouble(top));
parser._addAttribute("top", scratch); parser._addAttribute("top", scratch);
sprintf(scratch, "%g", right); sprintf(scratch, "%g", SkScalarToDouble(right));
parser._addAttribute("right", scratch); parser._addAttribute("right", scratch);
sprintf(scratch, "%g", bottom); sprintf(scratch, "%g", SkScalarToDouble(bottom));
parser._addAttribute("bottom", scratch); parser._addAttribute("bottom", scratch);
parser._endElement(); parser._endElement();
} }
8 changes: 4 additions & 4 deletions svg/SkSVGEllipse.cpp
Expand Up @@ -35,13 +35,13 @@ void SkSVGEllipse::translate(SkSVGParser& parser, bool defState) {
right = cx + rx; right = cx + rx;
bottom = cy + ry; bottom = cy + ry;
char scratch[16]; char scratch[16];
sprintf(scratch, "%g", left); sprintf(scratch, "%g", SkScalarToDouble(left));
parser._addAttribute("left", scratch); parser._addAttribute("left", scratch);
sprintf(scratch, "%g", top); sprintf(scratch, "%g", SkScalarToDouble(top));
parser._addAttribute("top", scratch); parser._addAttribute("top", scratch);
sprintf(scratch, "%g", right); sprintf(scratch, "%g", SkScalarToDouble(right));
parser._addAttribute("right", scratch); parser._addAttribute("right", scratch);
sprintf(scratch, "%g", bottom); sprintf(scratch, "%g", SkScalarToDouble(bottom));
parser._addAttribute("bottom", scratch); parser._addAttribute("bottom", scratch);
parser._endElement(); parser._endElement();
} }

0 comments on commit 723b5b2

Please sign in to comment.