cast to double

http://codereview.appspot.com/5645064/



git-svn-id: http://skia.googlecode.com/svn/trunk@3206 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
reed@google.com 2012-02-16 13:18:48 +00:00
parent ee51d1a6e4
commit 84ef10f8f9
3 changed files with 10 additions and 9 deletions

View File

@ -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);
}

View File

@ -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 File

@ -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();
}