Lines Matching full:path
35 return fShape.isPath() && !fShape.path().isVolatile();
58 static bool test_bounds_by_rasterizing(const SkPath& path, const SkRect& bounds) {
59 // We test the bounds by rasterizing the path into a kRes by kRes grid. The bounds is
61 // rendering within the bounds (with a tolerance). Then we render the path and check that
77 surface->getCanvas()->drawPath(path, whitePaint);
99 SkPath path;
100 shape.asPath(&path);
107 (shape.style().isSimpleFill() && path.isConvex());
113 // when there is a path effect. Thus, if there are two GrStyledShapes representing the same
114 // rrect but one has a path effect in its style and the other doesn't then asPath() and the
116 // for the shape without the path effect. If *both* have path effects then they should have both
137 // Having a dash path effect can allow 'a' but not 'b' to turn a inverse fill type into a
181 // GrStyledShape will close paths with simple fill style. Make the non-filled path
213 // doesn't (since the PE can set any fill type on its output path).
248 // If we started with a real path, then our genID should match that path's gen ID (and not be
249 // empty). If we started with a simple shape or a volatile path, our original path should have
259 // If the path effect produces a simple shape, then there are no unbroken chains to test
263 // From here on, we know that the path effect produced a shape that was a "real" path
334 virtual SkPath path() const = 0;
343 // Is this something we expect GrStyledShape to recognize as something simpler than a path.
351 SkPath path() const override {
352 SkPath path;
353 path.addRect(fRect);
354 return path;
381 SkPath path() const override {
382 SkPath path;
383 path.addRRect(fRRect);
384 return path;
407 SkPath path() const override {
408 SkPath path;
409 SkPathPriv::CreateDrawArcPath(&path, fOval, fStartAngle, fSweepAngle, fUseCenter, false);
410 return path;
432 PathGeo(const SkPath& path, Invert invert) : fPath(path) {
433 SkASSERT(!path.isInverseFillType());
448 SkPath path() const override { return fPath; }
499 RRectPathGeo(const SkPath& path, const SkRRect& equivalentRRect, RRectForStroke rrectForStroke,
501 : PathGeo(path, invert)
505 RRectPathGeo(const SkPath& path, const SkRect& equivalentRect, RRectForStroke rrectForStroke,
507 : RRectPathGeo(path, SkRRect::MakeRect(equivalentRect), rrectForStroke, invert) {}
572 SkPath path;
573 shape.asPath(&path);
574 // If the bounds are empty, the path ought to be as well.
576 REPORTER_ASSERT(r, path.isEmpty());
579 if (path.isEmpty()) {
583 SkPath p = path;
584 p.setFillType(SkPathFillType_ConvertToNonInverse(path.getFillType()));
603 // All shapes should report the same "original" path, so that path renderers can get to it
607 // Applying the path effect and then the stroke should always be the same as applying
613 // If the output of the path effect is a rrect then it is possible for a and b to be
615 // base -> apply path effect -> rrect_as_path -> stroke -> stroked_rrect_as_path
617 // now that there is no longer a path effect, the direction and starting index get
626 SkPath path;
627 fBase->asPath(&path);
628 REPORTER_ASSERT(r, path.isEmpty() == fBase->isEmpty());
629 REPORTER_ASSERT(r, path.getSegmentMasks() == fBase->segmentMask());
630 fAppliedPE->asPath(&path);
631 REPORTER_ASSERT(r, path.isEmpty() == fAppliedPE->isEmpty());
632 REPORTER_ASSERT(r, path.getSegmentMasks() == fAppliedPE->segmentMask());
633 fAppliedFull->asPath(&path);
634 REPORTER_ASSERT(r, path.isEmpty() == fAppliedFull->isEmpty());
635 REPORTER_ASSERT(r, path.getSegmentMasks() == fAppliedFull->segmentMask());
646 // Check that the same path is produced when style is applied by GrStyledShape and GrStyle.
670 // Because GrStyledShape always does two-stage application when there is a path
671 // effect there may be a reduction/canonicalization step between the path effect and
672 // strokerec not reflected in postAllStyle since it applied both the path effect
673 // and strokerec without analyzing the intermediate path.
705 // The base's key should always be valid (unless the path is volatile)
1155 * This path effect takes any input path and turns it into a rrect. It passes through stroke
1220 // Applying the path effect should make a SkRRect shape. There is no further stroking in the
1246 * This path effect just adds two lineTos to the input path.
1275 // This path effect should make the keys invalid when it is applied. We only produce a path
1276 // effect key for dash path effects. So the only way another arbitrary path effect can produce
1277 // a styled result with a key is to produce a non-path shape that has a purely geometric key.
1292 * This path effect just changes the stroke rec to hairline.
1333 // The base shape cannot perform canonicalization on the path's fill type because of an
1334 // unknown path effect. However, after the path effect is applied the resulting hairline
1335 // shape will canonicalize the path fill type since hairlines (and stroking in general)
1340 // If the resulting path is small enough then it will have a key.
1351 SkPath vPath = geo.path();
1359 // We expect a shape made from a volatile path to have a key iff the shape is recognized
1364 TestCase nonVolatileCase(reporter, geo.path(), dashAndStroke);
1377 * This path effect returns an empty path (possibly inverted)
1468 * This path effect always fails to apply.
1502 // In general the path effect failure can cause some of the TestCase::compare() tests to fail
1504 // path effect, but then when the path effect fails we can key it. 2) GrStyledShape will change
1505 // its mind about whether a unclosed rect is actually rect. The path effect initially bars us
1508 // the path (closed or not) but that fill the same.
1559 // Stroking an empty path should have no effect
1571 // Dashing and stroking an empty path should have no effect
1584 // A shape made from an empty rrect should behave the same as an empty path when filled and
1586 // is no path to dash along, making it equivalent as well.
1921 SkPath path;
1922 path.toggleInverseFillType();
1923 TestCase fillEmptyInverted(r, path, fill);
2116 // Give path b a different point
2122 // Give path b a different conic weight
2128 // Give path b an extra lineTo verb
2135 // Give path b a close
2251 TestCase fillPathCase(reporter, rrgeo.path(), fillPaint);
2257 TestCase fillPathCase2(reporter, rrgeo.path(), fillPaint);
2266 TestCase strokePathCase(reporter, rrgeo.path(), strokePaint);
2277 // Test a volatile empty path.
2313 // has a path effect. Also test that different ovals produce different shapes.
2340 // oval itself unless there is a path effect.
2361 SkPath path;
2364 path.addRoundRect(SkRect::MakeWH(50, 50), radii);
2365 path.toggleInverseFillType();
2367 GrShape inverseRRect(path);
2384 inverseRRect.setPath(path);