1 // Copyright 2019 Google LLC.
2 // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
3 #include "tools/fiddle/examples.h"
4 // HASH=c73f5e2644d949b859f05bd367883454
5 REG_FIDDLE(RRect_dumpHex, 256, 256, true, 0) {
6 void draw(SkCanvas* canvas) {
7 SkRRect rrect = SkRRect::MakeRect({6.f / 7, 2.f / 3, 6.f / 7, 2.f / 3});
9 SkRect bounds = SkRect::MakeLTRB(SkBits2Float(0x3f5b6db7), /* 0.857143 */
10 SkBits2Float(0x3f2aaaab), /* 0.666667 */
11 SkBits2Float(0x3f5b6db7), /* 0.857143 */
12 SkBits2Float(0x3f2aaaab) /* 0.666667 */);
13 const SkPoint corners[] = {
14 { SkBits2Float(0x00000000), SkBits2Float(0x00000000) }, /* 0.000000 0.000000 */
15 { SkBits2Float(0x00000000), SkBits2Float(0x00000000) }, /* 0.000000 0.000000 */
16 { SkBits2Float(0x00000000), SkBits2Float(0x00000000) }, /* 0.000000 0.000000 */
17 { SkBits2Float(0x00000000), SkBits2Float(0x00000000) }, /* 0.000000 0.000000 */
20 copy.setRectRadii(bounds, corners);
21 SkDebugf("rrect is " "%s" "equal to copy\n", rrect == copy ? "" : "not ");