227 {
229 if (!sdc) {
230 *errorMsg = kErrorMsg_DrawSkippedGpuOnly;
232 }
233
236
238 { { 0.31f *
w, 0.01f *
h}, { 0.48f *
w, 0.74f *
h }, { 0.19f *
w, 0.33f *
h } },
239 { { 0.00f *
w, 0.07f *
h}, { 0.30f *
w, 0.70f *
h }, { 0.47f *
w, 0.37f *
h } },
240 { { 0.15f *
w, 0.23f *
h}, { 0.49f *
w, 0.87f *
h }, { 0.85f *
w, 0.66f *
h } },
241 { { 0.09f *
w, 0.15f *
h}, { 0.42f *
w, 0.33f *
h }, { 0.17f *
w, 0.38f *
h } },
242 { { 0.98f *
w, 0.54f *
h}, { 0.83f *
w, 0.91f *
h }, { 0.62f *
w, 0.40f *
h } },
243 { { 0.96f *
w, 0.65f *
h}, { 0.03f *
w, 0.79f *
h }, { 0.24f *
w, 0.56f *
h } },
244 { { 0.57f *
w, 0.12f *
h}, { 0.33f *
w, 0.67f *
h }, { 0.59f *
w, 0.33f *
h } },
245 { { 0.12f *
w, 0.72f *
h}, { 0.69f *
w, 0.85f *
h }, { 0.46f *
w, 0.32f *
h } },
246 { { 0.27f *
w, 0.49f *
h}, { 0.41f *
w, 0.02f *
h }, { 0.11f *
w, 0.42f *
h } },
247 { { 0.40f *
w, 0.13f *
h}, { 0.83f *
w, 0.30f *
h }, { 0.31f *
w, 0.68f *
h } },
248 };
250 0.66f, 0.15f, 0.14f, 0.61f, 1.4f };
251
254
257
262
267
268
273 {
x + baseControlPts[row][0].
fX,
y + baseControlPts[row][0].
fY},
274 {
x + baseControlPts[row][1].
fX,
y + baseControlPts[row][1].
fY},
275 {
x + baseControlPts[row][2].
fX,
y + baseControlPts[row][2].
fY}
276 };
277
278 for (
int i = 0;
i < 3; ++
i) {
279 canvas->
drawCircle(controlPts[
i], 6.f, ctrlPtPaint);
280 }
281
283
286 int cnt = ChopConic(controlPts,
dst, weights[row]);
288
289 for (int c = 0; c < cnt; ++c) {
291 for (
int i = 0;
i < 3; ++
i) {
293 }
294
297
299
302 sdc->addDrawOp(std::move(op));
303 }
304 }
305
307 }
constexpr SkColor SK_ColorRED
std::unique_ptr< GrOp > Owner
void drawRect(const SkRect &rect, const SkPaint &paint)
void drawPoints(PointMode mode, size_t count, const SkPoint pts[], const SkPaint &paint)
@ kPolygon_PointMode
draw the array of points as a open polygon
void drawCircle(SkScalar cx, SkScalar cy, SkScalar radius, const SkPaint &paint)
void setStyle(Style style)
void setColor(SkColor color)
@ kStroke_Style
set to stroke geometry
void setStrokeWidth(SkScalar width)
static GrOp::Owner Make(GrRecordingContext *context, const SkRect &rect, const SkPMColor4f &color, const SkMatrix &klm)
void getConicKLM(const SkPoint p[3], const SkScalar weight, SkMatrix *klm)
Optional< SkRect > bounds
constexpr int kOpaqueBlack
SurfaceDrawContext * TopDeviceSurfaceDrawContext(const SkCanvas *canvas)
static SkRGBA4f FromBytes_RGBA(uint32_t color)