Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
weird_RRect_bug.cpp
Go to the documentation of this file.
1// Copyright 2020 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(weird_RRect_bug, 256, 256, false, 0) {
5void draw(SkCanvas* canvas) {
6 canvas->clear(SK_ColorWHITE);
7 // canvas->scale(2, 2);
8
9 SkPaint p;
10 p.setAntiAlias(false);
11 p.setStrokeWidth(3);
12 p.setStyle(SkPaint::kStroke_Style);
13
14 SkRect r = SkRect::MakeXYWH(20, 20, 20, 20);
15
16 SkRRect rr = SkRRect::MakeRectXY(r, 5, 5);
17
18 canvas->drawRRect(rr, p);
19}
20} // END FIDDLE
constexpr SkColor SK_ColorWHITE
Definition SkColor.h:122
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
Definition aaclip.cpp:27
void clear(SkColor color)
Definition SkCanvas.h:1199
void drawRRect(const SkRRect &rrect, const SkPaint &paint)
@ kStroke_Style
set to stroke geometry
Definition SkPaint.h:194
static SkRRect MakeRectXY(const SkRect &rect, SkScalar xRad, SkScalar yRad)
Definition SkRRect.h:180
#define REG_FIDDLE(NAME, W, H, TEXT, I)
Definition examples.h:60
static constexpr SkRect MakeXYWH(float x, float y, float w, float h)
Definition SkRect.h:659