Lines Matching refs:rrect

21 // The effects defined here only handle rrect radii >= kRadiusMin.
83 const SkRRect& rrect) {
87 return new CircularRRectEffect(edgeType, circularCornerFlags, rrect);
95 const SkRRect& rrect)
96 : fRRect(rrect)
117 SkRRect rrect;
118 rrect.setRectXY(SkRect::MakeWH(w, h), r, r);
123 fp = GrRRectEffect::Create(et, rrect);
155 // The inner rect is the rrect bounds inset by the radius. Its left, top, right, and bottom
156 // edges correspond to components x, y, z, and w, respectively. When a side of the rrect has
182 // to that corner. This means that points near the interior near the rrect top edge will have
186 // the rrect will have a (0,0) vector at all four corners. So long as the radius > 0.5 they will
192 // For the cases where one half of the rrect is rectangular we drop one of the x or y
298 const SkRRect& rrect = crre.getRRect();
299 if (rrect != fPrevRRect) {
300 SkRect rect = rrect.getBounds();
304 SkASSERT(rrect.isSimpleCircular());
305 radius = rrect.getSimpleRadii().fX;
310 radius = rrect.radii(SkRRect::kUpperLeft_Corner).fX;
317 radius = rrect.radii(SkRRect::kUpperRight_Corner).fX;
324 radius = rrect.radii(SkRRect::kLowerRight_Corner).fX;
331 radius = rrect.radii(SkRRect::kLowerLeft_Corner).fX;
338 radius = rrect.radii(SkRRect::kUpperLeft_Corner).fX;
345 radius = rrect.radii(SkRRect::kUpperLeft_Corner).fX;
352 radius = rrect.radii(SkRRect::kUpperRight_Corner).fX;
359 radius = rrect.radii(SkRRect::kLowerLeft_Corner).fX;
371 fPrevRRect = rrect;
420 EllipticalRRectEffect::Create(GrPrimitiveEdgeType edgeType, const SkRRect& rrect) {
424 return new EllipticalRRectEffect(edgeType, rrect);
431 EllipticalRRectEffect::EllipticalRRectEffect(GrPrimitiveEdgeType edgeType, const SkRRect& rrect)
432 : fRRect(rrect)
457 SkRRect rrect;
459 // half the time create a four-radii rrect.
469 rrect.setRectRadii(SkRect::MakeWH(w, h), r);
471 rrect.setRectXY(SkRect::MakeWH(w, h), r[SkRRect::kUpperLeft_Corner].fX,
478 fp = GrRRectEffect::Create(et, rrect);
510 // The inner rect is the rrect bounds inset by the x/y radii
520 // to that corner. This means that points near the interior near the rrect top edge will have
524 // the rrect will have a (0,0) vector at all four corners. So long as the radii > 0.5 they will
614 const SkRRect& rrect = erre.getRRect();
617 if (rrect != fPrevRRect) {
618 SkRect rect = rrect.getBounds();
619 const SkVector& r0 = rrect.radii(SkRRect::kUpperLeft_Corner);
639 const SkVector& r1 = rrect.radii(SkRRect::kLowerRight_Corner);
666 fPrevRRect = rrect;
683 GrFragmentProcessor* GrRRectEffect::Create(GrPrimitiveEdgeType edgeType, const SkRRect& rrect) {
684 if (rrect.isRect()) {
685 return GrConvexPolyEffect::Create(edgeType, rrect.getBounds());
688 if (rrect.isOval()) {
689 return GrOvalEffect::Create(edgeType, rrect.getBounds());
692 if (rrect.isSimple()) {
693 if (rrect.getSimpleRadii().fX < kRadiusMin || rrect.getSimpleRadii().fY < kRadiusMin) {
696 return GrConvexPolyEffect::Create(edgeType, rrect.getBounds());
698 if (rrect.getSimpleRadii().fX == rrect.getSimpleRadii().fY) {
700 rrect);
702 return EllipticalRRectEffect::Create(edgeType, rrect);
706 if (rrect.isComplex() || rrect.isNinePatch()) {
714 radii[c] = rrect.radii((SkRRect::Corner)c);
743 // This rrect should have been caught in the simple case above. Though, it would
754 SkTCopyOnFirstWrite<SkRRect> rr(rrect);
756 rr.writable()->setRectRadii(rrect.getBounds(), radii);
761 return GrConvexPolyEffect::Create(edgeType, rrect.getBounds());
769 if (rrect.isNinePatch()) {
770 return EllipticalRRectEffect::Create(edgeType, rrect);