Flutter Engine
The Flutter Engine
Canvas_drawIRect.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(Canvas_drawIRect, 256, 256, false, 0) {
5void draw(SkCanvas* canvas) {
6 SkIRect rect = { 64, 48, 192, 160 };
8 paint.setAntiAlias(true);
10 paint.setStrokeWidth(20);
11 paint.setStrokeJoin(SkPaint::kRound_Join);
13 paint.setColor(color);
14 canvas->drawIRect(rect, paint);
15 canvas->rotate(30, 128, 128);
16 }
17}
18} // END FIDDLE
REG_FIDDLE(Canvas_drawIRect, 256, 256, false, 0)
constexpr SkColor SK_ColorYELLOW
Definition: SkColor.h:139
constexpr SkColor SK_ColorMAGENTA
Definition: SkColor.h:147
constexpr SkColor SK_ColorBLUE
Definition: SkColor.h:135
constexpr SkColor SK_ColorRED
Definition: SkColor.h:126
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
Definition: aaclip.cpp:27
void drawIRect(const SkIRect &rect, const SkPaint &paint)
Definition: SkCanvas.h:1358
void rotate(SkScalar degrees)
Definition: SkCanvas.cpp:1300
@ kStroke_Style
set to stroke geometry
Definition: SkPaint.h:194
@ kRound_Join
adds circle
Definition: SkPaint.h:360
const Paint & paint
Definition: color_source.cc:38
DlColor color
sk_sp< SkBlender > blender SkRect rect
Definition: SkRecords.h:350
Definition: SkRect.h:32