Flutter Engine
The Flutter Engine
Canvas_drawRegion.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_drawRegion, 256, 256, false, 0) {
5void draw(SkCanvas* canvas) {
7 region.op({10, 10, 50, 50}, SkRegion::kUnion_Op);
8 region.op({10, 50, 90, 90}, SkRegion::kUnion_Op);
10 paint.setAntiAlias(true);
12 paint.setStrokeWidth(20);
13 paint.setStrokeJoin(SkPaint::kRound_Join);
14 canvas->drawRegion(region, paint);
15}
16} // END FIDDLE
REG_FIDDLE(Canvas_drawRegion, 256, 256, false, 0)
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
Definition: aaclip.cpp:27
void drawRegion(const SkRegion &region, const SkPaint &paint)
Definition: SkCanvas.cpp:1685
@ kStroke_Style
set to stroke geometry
Definition: SkPaint.h:194
@ kRound_Join
adds circle
Definition: SkPaint.h:360
@ kUnion_Op
target unioned with operand
Definition: SkRegion.h:369
bool op(const SkIRect &rect, Op op)
Definition: SkRegion.h:384
const Paint & paint
Definition: color_source.cc:38
ClipOpAndAA opAA SkRegion region
Definition: SkRecords.h:238