blob: 6aad0dc3d4f99a4a3cb844aaad0d1c5df39b7588 [file] [log] [blame]
Hal Canary87515122019-03-15 14:22:51 -04001#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.
Mike Kleinc0bd9f92019-04-23 12:05:21 -05004#include "tools/fiddle/examples.h"
Hal Canary87515122019-03-15 14:22:51 -04005// HASH=7c9e6a399f898d68026c1f0865e6f73e
Hal Canarya7181e7c2019-03-18 16:06:34 -04006REG_FIDDLE(Paint_getTextPath, 256, 128, false, 0) {
Hal Canary87515122019-03-15 14:22:51 -04007void draw(SkCanvas* canvas) {
8 SkPaint paint;
9 paint.setTextSize(80);
10 SkPath path, path2;
11 paint.getTextPath("ABC", 3, 20, 80, &path);
12 path.offset(20, 20, &path2);
13 Op(path, path2, SkPathOp::kDifference_SkPathOp, &path);
14 path.addPath(path2);
15 paint.setStyle(SkPaint::kStroke_Style);
16 canvas->drawPath(path, paint);
17}
18} // END FIDDLE
19#endif // Disabled until updated to use current API.