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=ad8f5d49edfcee60eddfe2a955b6c5f5 5cb93a386Sopenharmony_ciREG_FIDDLE(RRect_copy_const_SkRRect, 256, 60, false, 0) { 6cb93a386Sopenharmony_civoid draw(SkCanvas* canvas) { 7cb93a386Sopenharmony_ci SkRRect rrect = SkRRect::MakeRect({10, 10, 100, 50}); 8cb93a386Sopenharmony_ci SkRRect rrect2(rrect); 9cb93a386Sopenharmony_ci rrect2.inset(20, 20); 10cb93a386Sopenharmony_ci SkPaint p; 11cb93a386Sopenharmony_ci p.setStyle(SkPaint::kStroke_Style); 12cb93a386Sopenharmony_ci p.setStrokeWidth(10); 13cb93a386Sopenharmony_ci canvas->drawRRect(rrect, p); 14cb93a386Sopenharmony_ci canvas->drawRRect(rrect2, p); 15cb93a386Sopenharmony_ci} 16cb93a386Sopenharmony_ci} // END FIDDLE 17