1cb93a386Sopenharmony_ci// Copyright 2019 Google LLC. 2cb93a386Sopenharmony_ci// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. 3cb93a386Sopenharmony_ci#include "tools/fiddle/examples.h" 4cb93a386Sopenharmony_ci// HASH=3a90a91030f7289d5df0671d342dbbad 5cb93a386Sopenharmony_ciREG_FIDDLE(Path_addPath_3, 256, 160, false, 0) { 6cb93a386Sopenharmony_civoid draw(SkCanvas* canvas) { 7cb93a386Sopenharmony_ci SkPaint paint; 8cb93a386Sopenharmony_ci paint.setStyle(SkPaint::kStroke_Style); 9cb93a386Sopenharmony_ci SkPath dest, path; 10cb93a386Sopenharmony_ci path.addOval({20, 20, 200, 120}, SkPathDirection::kCW, 1); 11cb93a386Sopenharmony_ci for (int i = 0; i < 6; i++) { 12cb93a386Sopenharmony_ci SkMatrix matrix; 13cb93a386Sopenharmony_ci matrix.reset(); 14cb93a386Sopenharmony_ci matrix.setPerspX(i / 400.f); 15cb93a386Sopenharmony_ci dest.addPath(path, matrix); 16cb93a386Sopenharmony_ci } 17cb93a386Sopenharmony_ci canvas->drawPath(dest, paint); 18cb93a386Sopenharmony_ci} 19cb93a386Sopenharmony_ci} // END FIDDLE 20