blob: 9486ea66ceaf35143e3e07b200b560d95343a621 [file] [log] [blame]
Hal Canary83c2f702019-03-07 14:53:03 -05001#if 0 // Disabled until updated to use current API.
2// Copyright 2019 Google LLC.
3// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
4#include "fiddle/examples.h"
5// HASH=df181af37f1d2b06f0f45af73df7b47d
6REG_FIDDLE(RRect_029, 256, 256, false, 0) {
7void draw(SkCanvas* canvas) {
8 SkRRect rrect1 = SkRRect::MakeRectXY({10, 20, 60, 220}, 50, 200);
9 SkRRect rrect2 = SkRRect::MakeRectXY(rrect1.rect(), 25, 100);
10 SkRRect rrect3 = SkRRect::MakeOval(rrect1.rect());
11 canvas->drawRRect(rrect1, SkPaint());
12 std::string str = "rrect1 " + std::string(rrect1 == rrect2 ? "=" : "!") + "= rrect2";
13 canvas->drawString(str.c_str(), 10, 240, SkPaint());
14 canvas->translate(70, 0);
15 canvas->drawRRect(rrect2, SkPaint());
16 canvas->translate(70, 0);
17 canvas->drawRRect(rrect3, SkPaint());
18 str = "rrect2 " + std::string(rrect2 == rrect3 ? "=" : "!") + "= rrect3";
19 canvas->drawString(str.c_str(), -20, 240, SkPaint());
20}
21} // END FIDDLE
22#endif // Disabled until updated to use current API.