Go to the source code of this file.
◆ DEF_SIMPLE_GM()
DEF_SIMPLE_GM |
( |
bigrect |
, |
|
|
canvas |
, |
|
|
325 |
, |
|
|
125 |
|
|
) |
| |
Definition at line 74 of file bigrect.cpp.
74 {
75
76
77
78
80
81 for (
int i = 0;
i < 8;
i++) {
82 for (int j = 0; j < 3; j++) {
83 canvas->save();
85
88
91 } else {
93 }
95 paint.setStrokeWidth(1);
96 } else {
97 paint.setStrokeWidth(0);
98 }
100 paint.setAntiAlias(
true);
101 } else {
102 paint.setAntiAlias(
false);
103 }
104
106 canvas->restore();
107 }
108 }
109}
constexpr SkColor SK_ColorBLUE
static void draw_big_rect(SkCanvas *canvas, SkScalar big, const SkPaint &rectPaint)
@ kStroke_Style
set to stroke geometry
@ kFill_Style
set to fill geometry
◆ draw_big_rect()
Definition at line 16 of file bigrect.cpp.
16 {
17
18
19
20
21
22
23
24
25
26
27
28
29
31
32
34
37
40
42 canvas->
drawRect(fromLeft, rectPaint);
43
45 canvas->
drawRect(fromTop, rectPaint);
46
48 canvas->
drawRect(fromRight, rectPaint);
49
51 canvas->
drawRect(fromBottom, rectPaint);
52
54 canvas->
drawRect(leftBorder, rectPaint);
55
57 canvas->
drawRect(topBorder, rectPaint);
58
60 canvas->
drawRect(rightBorder, rectPaint);
61
63 canvas->
drawRect(bottomBorder, rectPaint);
64
69
71 canvas->
drawRect(outOfBounds, outOfBoundsPaint);
72}
constexpr SkColor SK_ColorRED
void drawRect(const SkRect &rect, const SkPaint &paint)
void clipRect(const SkRect &rect, SkClipOp op, bool doAntiAlias)
void translate(SkScalar dx, SkScalar dy)
void setStyle(Style style)
void setColor(SkColor color)
void setStrokeWidth(SkScalar width)
static constexpr SkRect MakeLTRB(float l, float t, float r, float b)