49 {
59
60
64 concavePaths.
back().
lineTo(28.867f, -16.6667f);
70 concavePaths.
back().
lineTo(-28.867f, 16.6667f);
72 concavePaths.
back().
lineTo(-28.867f, -16.6667f);
75
76
78 concavePaths.
back().
cubicTo(100, 25, 60, 50, 50, 0);
79 concavePaths.
back().
cubicTo(0, -25, 40, -50, 50, 0);
80
82 static constexpr SkScalar kLightR = 100.f;
84
85
88
94 matrices.
append()->reset();
95 matrices.
append()->setRotate(33.f, 25.f, 25.f).postScale(1.2f, 0.8f, 25.f, 25.f);
96 for (
auto&
m : matrices) {
98 int pathCounter = 0;
99 for (
const auto&
path : paths) {
101 m.mapRect(&postMBounds);
109 dy = 0;
110 }
111
114
115
118 canvas->
rotate(180, 25, 25);
119 }
129 kLightR, ambientColor, spotColor,
flags);
130 }
131
133 paint.setAntiAlias(
true);
135
138 } else {
140 }
142 paint.setStrokeWidth(0);
143 } else {
146 paint.setAlphaf(0.5f);
147 }
149 }
153 }
155
159 ++pathCounter;
160 }
161 }
162 }
163
164
169 dy = 0;
170 for (
auto&
m : matrices) {
171
172 for (
const auto&
path : concavePaths) {
174 m.mapRect(&postMBounds);
177
180
191 }
192
194 paint.setAntiAlias(
true);
196
199 paint.setStrokeWidth(0);
200 } else {
203 }
206
210 }
211 }
212
213
215 if (invCanvasM.
invert(&invCanvasM)) {
217 canvas->
concat(invCanvasM);
220 paint.setAntiAlias(
true);
223 }
224}
constexpr SkColor SK_ColorLTGRAY
constexpr SkColor SK_ColorCYAN
constexpr SkColor SK_ColorBLUE
constexpr SkColor SK_ColorBLACK
constexpr SkColor SK_ColorGREEN
@ kTransparentOccluder_ShadowFlag
static constexpr bool SkToBool(const T &x)
void translate(SkScalar dx, SkScalar dy)
void rotate(SkScalar degrees)
SkMatrix getTotalMatrix() const
void drawPath(const SkPath &path, const SkPaint &paint)
void concat(const SkMatrix &matrix)
void drawCircle(SkScalar cx, SkScalar cy, SkScalar radius, const SkPaint &paint)
bool invert(SkMatrix *inverse) const
void mapXY(SkScalar x, SkScalar y, SkPoint *result) const
@ kStroke_Style
set to stroke geometry
static SkPath Rect(const SkRect &, SkPathDirection=SkPathDirection::kCW, unsigned startIndex=0)
SkPath & moveTo(SkScalar x, SkScalar y)
SkPath & lineTo(SkScalar x, SkScalar y)
static SkPath Circle(SkScalar center_x, SkScalar center_y, SkScalar radius, SkPathDirection dir=SkPathDirection::kCW)
static SkPath Oval(const SkRect &, SkPathDirection=SkPathDirection::kCW)
SkPath & cubicTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2, SkScalar x3, SkScalar y3)
void setNinePatch(const SkRect &rect, SkScalar leftRad, SkScalar topRad, SkScalar rightRad, SkScalar bottomRad)
FlutterSemanticsFlag flags
static float max(float r, float g, float b)
skia_private::AutoTArray< sk_sp< SkImageFilter > > filters TypedMatrix matrix TypedMatrix matrix SkScalar dx
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path
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 mode
void draw_shadow(SkCanvas *canvas, const SkPath &path, SkScalar height, SkColor color, SkPoint3 lightPos, SkScalar lightR, bool isAmbient, uint32_t flags)
constexpr float height() const