b86cd3d3f0
Change-Id: I7d94fe7aed702afd0626a40db201caaf7c2a7764 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/342927 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Kevin Lubick <kjlubick@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org>
21 lines
660 B
C++
21 lines
660 B
C++
// Copyright 2020 Google LLC.
|
|
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
|
|
#include "tools/fiddle/examples.h"
|
|
REG_FIDDLE_ANIMATED(skew_x_animated, 256, 256, false, 6, 6) {
|
|
void draw(SkCanvas* canvas) {
|
|
canvas->clear(SK_ColorWHITE);
|
|
SkMatrix matrix;
|
|
matrix.setAll(2, 5 * cos(6.28318548 * frame), 0,
|
|
0, 2, 128,
|
|
0, 0, 1);
|
|
SkPaint paint;
|
|
paint.setShader(
|
|
image->makeShader(
|
|
SkTileMode::kRepeat,
|
|
SkTileMode::kRepeat,
|
|
SkSamplingOptions(),
|
|
matrix));
|
|
canvas->drawPaint(paint);
|
|
}
|
|
} // END FIDDLE
|