Flutter Engine
The Flutter Engine
RRect_inset.cpp
Go to the documentation of this file.
1// Copyright 2019 Google LLC.
2// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
4REG_FIDDLE(RRect_inset, 256, 256, false, 0) {
5void draw(SkCanvas* canvas) {
7 paint.setAntiAlias(true);
9 SkRRect rrect = SkRRect::MakeRectXY({100, 20, 140, 220}, 50, 100);
10 for (int index = 0; index < 25; ++index) {
11 canvas->drawRRect(rrect, paint);
12 rrect.inset(-3, 3, &rrect);
13 }
14}
15} // END FIDDLE
REG_FIDDLE(RRect_inset, 256, 256, false, 0)
Definition: RRect_inset.cpp:4
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
Definition: aaclip.cpp:27
void drawRRect(const SkRRect &rrect, const SkPaint &paint)
Definition: SkCanvas.cpp:1705
@ kStroke_Style
set to stroke geometry
Definition: SkPaint.h:194
void inset(SkScalar dx, SkScalar dy, SkRRect *dst) const
Definition: SkRRect.cpp:562
static SkRRect MakeRectXY(const SkRect &rect, SkScalar xRad, SkScalar yRad)
Definition: SkRRect.h:180
const Paint & paint
Definition: color_source.cc:38
SkRRect rrect
Definition: SkRecords.h:232