• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #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 "tools/fiddle/examples.h"
5 // HASH=505e47b3e6474ebdecdc04c3c2af2c34
6 REG_FIDDLE(RRect_notequal_operator, 256, 256, false, 0) {
7 void draw(SkCanvas* canvas) {
8     SkRRect rrect1 = SkRRect::MakeRectXY({10, 20, 60, 220}, 50, 100);
9     SkRRect rrect2 = SkRRect::MakeRectXY(rrect1.rect(), 50, 50);
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.
23