Flutter Engine
The Flutter Engine
RRect_copy_operator.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_copy_operator, 256, 110, false, 0) {
5void draw(SkCanvas* canvas) {
6 SkRRect rrect = SkRRect::MakeRect({40, 40, 100, 70});
7 SkRRect rrect2 = rrect;
8 rrect2.inset(-20, -20);
10 p.setStyle(SkPaint::kStroke_Style);
11 p.setStrokeWidth(10);
12 canvas->drawRRect(rrect, p);
13 canvas->drawRRect(rrect2, p);
14}
15} // END FIDDLE
REG_FIDDLE(RRect_copy_operator, 256, 110, false, 0)
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 MakeRect(const SkRect &r)
Definition: SkRRect.h:149
SkRRect rrect
Definition: SkRecords.h:232