Canvas_drawDRRect_a.cpp 488 B

123456789101112
  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=02e33141f13da2f19aef7feb7117b541
  5. REG_FIDDLE(Canvas_drawDRRect_a, 256, 256, false, 0) {
  6. void draw(SkCanvas* canvas) {
  7. SkRRect outer = SkRRect::MakeRect({20, 40, 210, 200});
  8. SkRRect inner = SkRRect::MakeOval({60, 70, 170, 160});
  9. SkPaint paint;
  10. canvas->drawDRRect(outer, inner, paint);
  11. }
  12. } // END FIDDLE