blob: 84d0f5a045cc1e117316d2dbb95d45dee991e070 [file] [log] [blame]
Hal Canary6c8422c2020-01-10 15:22:09 -05001// Copyright 2020 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"
4REG_FIDDLE(skpaint_line_2d_path_effect, 256, 256, false, 0) {
5void draw(SkCanvas* canvas) {
6 SkPaint paint;
7 SkMatrix lattice;
8 lattice.setScale(8.0f, 8.0f);
9 lattice.preRotate(30.0f);
10 paint.setPathEffect(SkLine2DPathEffect::Make(0.0f, lattice));
11 paint.setAntiAlias(true);
12 SkRect bounds = SkRect::MakeWH(256, 256);
13 bounds.outset(8.0f, 8.0f);
14 canvas->clear(SK_ColorWHITE);
15 canvas->drawRect(bounds, paint);
16}
17} // END FIDDLE