Definition at line 24 of file complexclip2.cpp.
◆ Clip
Enumerator |
---|
kRect_Clip | |
kRRect_Clip | |
kPath_Clip | |
Definition at line 26 of file complexclip2.cpp.
◆ ComplexClip2GM()
skiagm::ComplexClip2GM::ComplexClip2GM |
( |
Clip |
clip, |
|
|
bool |
antiAlias |
|
) |
| |
|
inline |
Definition at line 32 of file complexclip2.cpp.
34 , fAntiAlias(antiAlias) {
37
40
41 fWidth = xF - xA;
42 fHeight = yF - yA;
43
46 }
static SkPath clip(const SkPath &path, const SkHalfPlane &plane)
static constexpr int kCols
static constexpr int kPadY
static constexpr int kRows
static constexpr int kPadX
◆ ClipStr()
static const char * skiagm::ComplexClip2GM::ClipStr |
( |
Clip |
clip | ) |
|
|
inlinestaticprotected |
Definition at line 112 of file complexclip2.cpp.
112 {
115 return "rect";
117 return "rrect";
119 return "path";
120 }
122 return "";
123 }
#define SkDEBUGFAIL(message)
◆ getISize()
SkISize skiagm::ComplexClip2GM::getISize |
( |
| ) |
|
|
inlineoverrideprotectedvirtual |
Implements skiagm::GM.
Definition at line 137 of file complexclip2.cpp.
137 {
140 }
#define SkScalarRoundToInt(x)
static constexpr SkISize Make(int32_t w, int32_t h)
◆ getName()
SkString skiagm::ComplexClip2GM::getName |
( |
| ) |
const |
|
inlineoverrideprotectedvirtual |
Implements skiagm::GM.
Definition at line 125 of file complexclip2.cpp.
125 {
128 }
129
131 str.
printf(
"complexclip2_%s_%s",
133 fAntiAlias ? "aa" : "bw");
134 return str;
135 }
void printf(const char format[],...) SK_PRINTF_LIKE(2
static const char * ClipStr(Clip clip)
◆ onDraw()
void skiagm::ComplexClip2GM::onDraw |
( |
SkCanvas * |
canvas | ) |
|
|
inlineoverrideprotectedvirtual |
Reimplemented from skiagm::GM.
Definition at line 142 of file complexclip2.cpp.
142 {
146
149
151 for (
int j = 0; j <
kCols; ++j) {
153
156
157
158
159 for (int k = 0; k < 5; ++k) {
161 switch (fClip) {
163 canvas->
drawRect(fRects[k], rectPaint);
164 break;
166 canvas->
drawRRect(fRRects[k], rectPaint);
167 break;
169 canvas->
drawPath(fPaths[k], rectPaint);
170 break;
171 }
172 }
173
174 for (int k = 0; k < 5; ++k) {
175 switch (fClip) {
179 fAntiAlias);
180 break;
184 fAntiAlias);
185 break;
189 fAntiAlias);
190 break;
191 }
192 }
195 }
196 }
197 }
#define SkColorSetRGB(r, g, b)
void drawRect(const SkRect &rect, const SkPaint &paint)
void clipRect(const SkRect &rect, SkClipOp op, bool doAntiAlias)
void translate(SkScalar dx, SkScalar dy)
void drawRRect(const SkRRect &rrect, const SkPaint &paint)
void clipPath(const SkPath &path, SkClipOp op, bool doAntiAlias)
void drawPath(const SkPath &path, const SkPaint &paint)
void clipRRect(const SkRRect &rrect, SkClipOp op, bool doAntiAlias)
void setStyle(Style style)
void setColor(SkColor color)
@ kStroke_Style
set to stroke geometry
void setStrokeWidth(SkScalar width)
static constexpr SkRect MakeWH(float w, float h)
◆ onOnceBeforeDraw()
void skiagm::ComplexClip2GM::onOnceBeforeDraw |
( |
| ) |
|
|
inlineoverrideprotectedvirtual |
Reimplemented from skiagm::GM.
Definition at line 49 of file complexclip2.cpp.
49 {
51
52
59
66
67 fRects[0].
setLTRB(xB, yB, xE, yE);
71
72 fRects[1].
setLTRB(xA, yA, xD, yD);
76
77 fRects[2].
setLTRB(xC, yA, xF, yD);
81
82 fRects[3].
setLTRB(xA, yC, xD, yF);
86
87 fRects[4].
setLTRB(xC, yC, xF, yF);
91
95 };
96
99 for (
int j = 0; j <
kCols; ++j) {
100 for (int k = 0; k < 5; ++k) {
102 }
103 }
104 }
105 }
constexpr SkColor SK_ColorYELLOW
constexpr SkColor SK_ColorCYAN
constexpr SkColor SK_ColorBLUE
constexpr SkColor SK_ColorRED
constexpr SkColor SK_ColorGREEN
static SkPath RRect(const SkRRect &, SkPathDirection dir=SkPathDirection::kCW)
void setRectXY(const SkRect &rect, SkScalar xRad, SkScalar yRad)
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
void setLTRB(float left, float top, float right, float bottom)
◆ kCols
constexpr int skiagm::ComplexClip2GM::kCols = 5 |
|
inlinestaticconstexprprotected |
◆ kPadX
constexpr int skiagm::ComplexClip2GM::kPadX = 20 |
|
inlinestaticconstexprprotected |
◆ kPadY
constexpr int skiagm::ComplexClip2GM::kPadY = 20 |
|
inlinestaticconstexprprotected |
◆ kRows
constexpr int skiagm::ComplexClip2GM::kRows = 5 |
|
inlinestaticconstexprprotected |
The documentation for this class was generated from the following file: