Lines Matching refs:style

4  * Use of this source code is governed by a BSD-style license that can be
101 if (shape.style().hasNonDashPathEffect()) {
104 const SkStrokeRec::Style strokeRecStyle = shape.style().strokeRec().getStyle();
107 (shape.style().isSimpleFill() && path.isConvex());
114 // rrect but one has a path effect in its style and the other doesn't then asPath() and the
128 bool aHasPE = a.style().hasPathEffect();
129 bool bHasPE = b.style().hasPathEffect();
131 // GrStyledShape will close paths with simple fill style.
132 bool allowedClosednessDiff = (a.style().isSimpleFill() != b.style().isSimpleFill());
143 bool canDropInverse1 = s1->style().isDashed();
144 bool canDropInverse2 = s2->style().isDashed();
181 // GrStyledShape will close paths with simple fill style. Make the non-filled path
214 // Moreover, dash style explicitly ignores inverseness. So if one is dashed but not the other
216 if (a.style().hasNonDashPathEffect() == b.style().hasNonDashPathEffect() &&
217 a.style().isDashed() == b.style().isDashed()) {
303 if (shape.style().isSimpleFill()) {
318 // original shape has an inherited style key. That gets dropped on the first inversion flip.
335 // These functions allow tests to check for special cases where style gets
646 // Check that the same path is produced when style is applied by GrStyledShape and GrStyle.
653 if (fBase->style().applyPathEffectToPath(&postPathEffect, &postPEStrokeRec, preStyle,
663 REPORTER_ASSERT(r, postPEStrokeRec.hasEqualEffect(fAppliedPE->style().strokeRec()));
666 if (fBase->style().applyToPath(&postAllStyle, &fillOrHairline, preStyle, scale)) {
669 if (fBase->style().hasPathEffect()) {
683 REPORTER_ASSERT(r, fAppliedFull->style().isSimpleFill());
685 REPORTER_ASSERT(r, fAppliedFull->style().isSimpleHairline());
861 // Since hairline style doesn't change the SkPath data, it is keyed identically to fill (except
868 REPORTER_ASSERT(reporter, hairlineCase.baseShape().style().isSimpleHairline());
869 REPORTER_ASSERT(reporter, hairlineCase.appliedFullStyleShape().style().isSimpleHairline());
870 REPORTER_ASSERT(reporter, hairlineCase.appliedPathEffectShape().style().isSimpleHairline());
901 REPORTER_ASSERT(reporter, !strokeCase1.baseShape().style().applies());
929 REPORTER_ASSERT(reporter, !strokeAndFillCase1.baseShape().style().applies());
998 // Make sure stroking params don't affect fill style.
1054 // affecting the style key.
1221 // geoPECase, so the full style should be the same as just the PE.
1232 // In the PE+stroke case applying the full style should be the same as just stroking the rrect.
1346 REPORTER_ASSERT(reporter, peCase.appliedPathEffectShape().style().isSimpleHairline());
1347 REPORTER_ASSERT(reporter, peCase.appliedFullStyleShape().style().isSimpleHairline());
1555 // This will test whether applying style preserves emptiness
1672 Style style,
1677 style * ( 2) +
1686 for (Style style : {kFill, kStroke, kHairline, kStrokeAndFill}) {
1689 shapes[index(inverted, dir, start, style, dash)] =
1691 GrStyle(strokeRecs[style], std::move(pe)));
1831 REPORTER_ASSERT(r, !fillCase.style().pathEffect());
1832 REPORTER_ASSERT(r, !strokeAndFillCase.style().pathEffect());
1855 REPORTER_ASSERT(r, strokeCase.style().pathEffect());
1856 REPORTER_ASSERT(r, hairlineCase.style().pathEffect());
1871 // The pre-style case for the dash will match the non-dash example iff the
1883 REPORTER_ASSERT(r, !strokeCase.style().pathEffect());
1884 REPORTER_ASSERT(r, !hairlineCase.style().pathEffect());
2303 for (const auto& style : styles) {
2305 TestCase emptyArc(GrStyledShape::MakeArc(SkRect::MakeEmpty(), 0, 90.f, false, style),
2307 TestCase emptyPath(reporter, SkPath(), style);
2314 TestCase arc1CW(GrStyledShape::MakeArc(kOval1, 0, 90.f, false, style), reporter);
2315 TestCase arc1CCW(GrStyledShape::MakeArc(kOval1, 90.f, -90.f, false, style), reporter);
2317 TestCase arc1CWWithCenter(GrStyledShape::MakeArc(kOval1, 0, 90.f, true, style), reporter);
2318 TestCase arc1CCWWithCenter(GrStyledShape::MakeArc(kOval1, 90.f, -90.f, true, style),
2321 TestCase arc2CW(GrStyledShape::MakeArc(kOval2, 0, 90.f, false, style), reporter);
2322 TestCase arc2CWWithCenter(GrStyledShape::MakeArc(kOval2, 0, 90.f, true, style), reporter);
2324 auto reversedExepectations = style.hasPathEffect()
2335 TestCase arc3A(GrStyledShape::MakeArc(kOval1, 224.f, 73.f, false, style), reporter);
2336 TestCase arc3B(GrStyledShape::MakeArc(kOval1, 224.f - 360.f, 73.f, false, style), reporter);
2341 TestCase ovalArc(GrStyledShape::MakeArc(kOval1, 150.f, -790.f, false, style), reporter);
2343 auto ovalExpectations = style.hasPathEffect() ? TestCase::kAllDifferent_ComparisonExpecation
2345 if (style.strokeRec().getWidth() >= 0 && style.strokeRec().getCap() != SkPaint::kButt_Cap) {
2352 TestCase ovalArcWithCenter(GrStyledShape::MakeArc(kOval1, 304.f, 1225.f, true, style),
2354 ovalExpectations = style.isSimpleFill() ? TestCase::kAllSame_ComparisonExpecation