Flutter Engine
The Flutter Engine
Functions
weird_RRect_bug.cpp File Reference
#include "tools/fiddle/examples.h"

Go to the source code of this file.

Functions

 REG_FIDDLE (weird_RRect_bug, 256, 256, false, 0)
 

Function Documentation

◆ REG_FIDDLE()

REG_FIDDLE ( weird_RRect_bug  ,
256  ,
256  ,
false  ,
 
)

Definition at line 4 of file weird_RRect_bug.cpp.

4 {
5void draw(SkCanvas* canvas) {
6 canvas->clear(SK_ColorWHITE);
7 // canvas->scale(2, 2);
8
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)
Definition: SkCanvas.cpp:1705
@ kStroke_Style
set to stroke geometry
Definition: SkPaint.h:194
static SkRRect MakeRectXY(const SkRect &rect, SkScalar xRad, SkScalar yRad)
Definition: SkRRect.h:180
static constexpr SkRect MakeXYWH(float x, float y, float w, float h)
Definition: SkRect.h:659