5 {
7 auto debugster = [](
const SkRect&
test) ->
void {
8 SkRect negZero = {-0.0f, -0.0f, 2, 2};
9 SkDebugf(
"{%g, %g, %g, %g} %c= {%g, %g, %g, %g} %s numerically equal\n",
11 test == negZero ?
'=' :
'!',
12 negZero.fLeft, negZero.fTop, negZero.fRight, negZero.fBottom,
13 (
test.fLeft == negZero.fLeft &&
test.fTop == negZero.fTop &&
14 test.fRight == negZero.fRight &&
test.fBottom == negZero.fBottom) ?
15 "and are" : "yet are not");
16 };
17 SkRect tests[] = {{0, 0, 2, 2}, {-0, -0, 2, 2}, {0.0f, 0.0f, 2, 2}};
19 for (
auto rect :
tests) {
20 debugster(rect);
21 }
22}
23}
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)