diff options
-rw-r--r-- | samplecode/SamplePath.cpp | 3 | ||||
-rw-r--r-- | src/svg/SkSVGCircle.cpp | 8 | ||||
-rw-r--r-- | src/svg/SkSVGEllipse.cpp | 8 |
3 files changed, 10 insertions, 9 deletions
diff --git a/samplecode/SamplePath.cpp b/samplecode/SamplePath.cpp index 7e2750a354..ddfbb71659 100644 --- a/samplecode/SamplePath.cpp +++ b/samplecode/SamplePath.cpp @@ -67,7 +67,8 @@ static void test_cubic2() { SkIRect ir; r.round(&ir); printf("[%g %g %g %g] [%x %x %x %x]\n", - r.fLeft, r.fTop, r.fRight, r.fBottom, + SkScalarToDouble(r.fLeft), SkScalarToDouble(r.fTop), + SkScalarToDouble(r.fRight), SkScalarToDouble(r.fBottom), ir.fLeft, ir.fTop, ir.fRight, ir.fBottom); } diff --git a/src/svg/SkSVGCircle.cpp b/src/svg/SkSVGCircle.cpp index 2f282bd696..e34e17959e 100644 --- a/src/svg/SkSVGCircle.cpp +++ b/src/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(); } diff --git a/src/svg/SkSVGEllipse.cpp b/src/svg/SkSVGEllipse.cpp index e2395657e9..281e4e925b 100644 --- a/src/svg/SkSVGEllipse.cpp +++ b/src/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(); } |