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

Go to the source code of this file.

Functions

 REG_FIDDLE (bug6495, 256, 256, false, 0)
 

Function Documentation

◆ REG_FIDDLE()

REG_FIDDLE ( bug6495  ,
256  ,
256  ,
false  ,
 
)

Definition at line 4 of file bug6495.cpp.

4 {
5void draw(SkCanvas* canvas) {
7 p.setColor(SK_ColorRED);
8 p.setAntiAlias(true);
10 p.setStrokeWidth(10);
11
12 SkRect r = SkRect::MakeXYWH(20, 20, 100, 100);
13
14 canvas->rotate(90);
15 canvas->scale(1.0, -1.0);
16 canvas->drawOval(r, p);
17
18 p.setColor(SK_ColorGREEN);
19
20 canvas->save();
21 canvas->scale(1.0, 0.4999);
22 canvas->drawOval(r, p);
23 canvas->restore();
24
25 canvas->save();
26 canvas->scale(1.0, 0.5000);
27 canvas->drawOval(r, p);
28 canvas->restore();
29
30 canvas->save();
31 canvas->scale(1.0, 0.5001);
32 canvas->drawOval(r, p);
33 canvas->restore();
34}
35} // END FIDDLE
constexpr SkColor SK_ColorRED
Definition: SkColor.h:126
constexpr SkColor SK_ColorGREEN
Definition: SkColor.h:131
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
Definition: aaclip.cpp:27
void drawOval(const SkRect &oval, const SkPaint &paint)
Definition: SkCanvas.cpp:1698
void restore()
Definition: SkCanvas.cpp:461
void rotate(SkScalar degrees)
Definition: SkCanvas.cpp:1300
int save()
Definition: SkCanvas.cpp:447
void scale(SkScalar sx, SkScalar sy)
Definition: SkCanvas.cpp:1289
@ kStroke_Style
set to stroke geometry
Definition: SkPaint.h:194
static constexpr SkRect MakeXYWH(float x, float y, float w, float h)
Definition: SkRect.h:659