blob: 5809600d9783bb3ed75195d7d9409ac6ec1dfb2f [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=50969745cf2b23544362f4cff5592b75
6REG_FIDDLE(RRect_040, 256, 110, false, 0) {
7void draw(SkCanvas* canvas) {
8 SkVector radii[] = {{5, 5}, {10, 10}, {15, 15}, {5, 5}};
9 SkRRect rrect;
10 rrect.setRectRadii({10, 10, 110, 80}, radii);
11 char storage[SkRRect::kSizeInMemory];
12 rrect.writeToMemory(storage);
13 SkRRect copy;
14 copy.readFromMemory(storage, sizeof(storage));
15 SkPaint paint;
16 paint.setAntiAlias(true);
17 canvas->drawString("rrect", 55, 100, paint);
18 canvas->drawString("copy", 185, 100, paint);
19 paint.setStyle(SkPaint::kStroke_Style);
20 canvas->drawRRect(rrect, paint);
21 canvas->translate(120, 0);
22 canvas->drawRRect(copy, paint);
23}
24} // END FIDDLE
25#endif // Disabled until updated to use current API.