Lines Matching defs:path
45 static int getOnCurvePoints(const SkPath& path, SkPoint storage[]) {
47 for (auto [verb, pts, w] : SkPathPriv::Iterate(path)) {
63 static void getContourCounts(const SkPath& path, SkTArray<int>* contourCounts) {
65 for (auto [verb, pts, w] : SkPathPriv::Iterate(path)) {
283 void draw_points(SkCanvas* canvas, const SkPath& path, SkColor color,
289 int n = path.countPoints();
293 getContourCounts(path, &contourCounts);
297 path.getPoints(ptPtr, count);
302 n = getOnCurvePoints(path, pts.get());
308 void draw_ribs(SkCanvas* canvas, const SkPath& path, SkScalar width,
312 SkPathMeasure meas(path, false);
341 void draw_t_divs(SkCanvas* canvas, const SkPath& path, SkScalar width, SkColor color) {
345 SkPathMeasure meas(path, false);
352 const uint8_t* verbs = SkPathPriv::VerbData(path);
353 if (path.countVerbs() < 2 || SkPath::kMove_Verb != verbs[0]) {
359 const SkPoint* pts = SkPathPriv::PointData(path);
375 SkConic conic(pts, SkPathPriv::ConicWeightData(path)[0]);
399 void draw_stroke(SkCanvas* canvas, const SkPath& path, SkScalar width, SkScalar scale,
401 if (path.isEmpty()) {
404 SkRect bounds = path.getBounds();
415 fMinSurface->getCanvas()->drawPath(path, paint);
429 path.transform(matrix, &scaled);
431 scaled = path;
453 p.getFillPath(path, &fill);
473 SkPath path;
476 path.addCircle(center.fX, center.fY, maxSide);
477 canvas->drawPath(path, paint);
479 path.reset();
480 path.addCircle(center.fX, center.fY, maxSide - width / 2);
482 canvas->drawPath(path, paint);
483 path.reset();
484 path.setFillType(SkPathFillType::kEvenOdd);
485 path.addCircle(center.fX, center.fY, maxSide + width / 2);
488 path.addRect(outside);
489 canvas->drawPath(path, paint);
555 SkPath path;
556 path.moveTo(fPts[10]);
557 path.arcTo(fPts[11], fPts[12], fRadius);
558 SkPath::Iter iter(path, false);
589 SkPath path;
593 path.moveTo(fPts[0]);
594 path.cubicTo(fPts[1], fPts[2], fPts[3]);
596 draw_stroke(canvas, path, width, 950, false);
600 path.reset();
601 path.moveTo(fPts[4]);
602 path.conicTo(fPts[5], fPts[6], fWeight);
604 draw_stroke(canvas, path, width, 950, false);
608 path.reset();
609 path.moveTo(fPts[7]);
610 path.quadTo(fPts[8], fPts[9]);
612 draw_stroke(canvas, path, width, 950, false);
616 path.reset();
617 path.moveTo(fPts[10]);
618 path.arcTo(fPts[11], fPts[12], fRadius);
620 draw_stroke(canvas, path, width, 950, false);
632 path.reset();
635 path.addRRect(rr);
637 draw_stroke(canvas, path, width, 950, false);
639 path.reset();
642 path.addRRect(rr2, SkPathDirection::kCCW);
644 path.addRRect(rr2, SkPathDirection::kCW);
648 canvas->drawPath(path, paint);
652 path.reset();
655 path.addOval(r);
667 draw_stroke(canvas, path, width, 950, false);
672 path.reset();
676 0, fTextSize, font, &path);
678 draw_stroke(canvas, path, width * fWidthScale / fTextSize, fTextSize, true);