Lines Matching refs:rrect

18 // The effects defined here only handle rrect radii >= kRadiusMin.
80 const SkRRect& rrect) {
85 (edgeType, circularCornerFlags, rrect))));
97 const SkRRect& rrect)
98 : fRRect(rrect)
121 SkRRect rrect;
122 rrect.setRectXY(SkRect::MakeWH(w, h), r, r);
126 effect = GrRRectEffect::Create(et, rrect);
172 // The inner rect is the rrect bounds inset by the radius. Its left, top, right, and bottom
173 // edges correspond to components x, y, z, and w, respectively. When a side of the rrect has
187 // to that corner. This means that points near the interior near the rrect top edge will have
191 // the rrect will have a (0,0) vector at all four corners. So long as the radius > 0.5 they will
197 // For the cases where one half of the rrect is rectangular we drop one of the x or y
304 const SkRRect& rrect = crre.getRRect();
305 if (rrect != fPrevRRect) {
306 SkRect rect = rrect.getBounds();
310 SkASSERT(rrect.isSimpleCircular());
311 radius = rrect.getSimpleRadii().fX;
316 radius = rrect.radii(SkRRect::kUpperLeft_Corner).fX;
323 radius = rrect.radii(SkRRect::kUpperRight_Corner).fX;
330 radius = rrect.radii(SkRRect::kLowerRight_Corner).fX;
337 radius = rrect.radii(SkRRect::kLowerLeft_Corner).fX;
344 radius = rrect.radii(SkRRect::kUpperLeft_Corner).fX;
351 radius = rrect.radii(SkRRect::kUpperLeft_Corner).fX;
358 radius = rrect.radii(SkRRect::kUpperRight_Corner).fX;
365 radius = rrect.radii(SkRRect::kLowerLeft_Corner).fX;
376 fPrevRRect = rrect;
415 GrEffectRef* EllipticalRRectEffect::Create(GrEffectEdgeType edgeType, const SkRRect& rrect) {
419 return CreateEffectRef(AutoEffectUnref(SkNEW_ARGS(EllipticalRRectEffect, (edgeType, rrect))));
430 EllipticalRRectEffect::EllipticalRRectEffect(GrEffectEdgeType edgeType, const SkRRect& rrect)
431 : fRRect(rrect)
458 SkRRect rrect;
460 // half the time create a four-radii rrect.
470 rrect.setRectRadii(SkRect::MakeWH(w, h), r);
472 rrect.setRectXY(SkRect::MakeWH(w, h), r[SkRRect::kUpperLeft_Corner].fX,
478 effect = GrRRectEffect::Create(et, rrect);
523 // The inner rect is the rrect bounds inset by the x/y radii
531 // to that corner. This means that points near the interior near the rrect top edge will have
535 // the rrect will have a (0,0) vector at all four corners. So long as the radii > 0.5 they will
599 const SkRRect& rrect = erre.getRRect();
600 if (rrect != fPrevRRect) {
601 SkRect rect = rrect.getBounds();
602 const SkVector& r0 = rrect.radii(SkRRect::kUpperLeft_Corner);
612 const SkVector& r1 = rrect.radii(SkRRect::kLowerRight_Corner);
629 fPrevRRect = rrect;
635 GrEffectRef* GrRRectEffect::Create(GrEffectEdgeType edgeType, const SkRRect& rrect) {
636 if (rrect.isRect()) {
637 return GrConvexPolyEffect::Create(edgeType, rrect.getBounds());
640 if (rrect.isOval()) {
641 return GrOvalEffect::Create(edgeType, rrect.getBounds());
644 if (rrect.isSimple()) {
645 if (rrect.getSimpleRadii().fX < kRadiusMin || rrect.getSimpleRadii().fY < kRadiusMin) {
648 return GrConvexPolyEffect::Create(edgeType, rrect.getBounds());
650 if (rrect.getSimpleRadii().fX == rrect.getSimpleRadii().fY) {
652 rrect);
654 return EllipticalRRectEffect::Create(edgeType, rrect);
658 if (rrect.isComplex() || rrect.isNinePatch()) {
666 radii[c] = rrect.radii((SkRRect::Corner)c);
695 // This rrect should have been caught in the simple case above. Though, it would
706 SkTCopyOnFirstWrite<SkRRect> rr(rrect);
708 rr.writable()->setRectRadii(rrect.getBounds(), radii);
713 return GrConvexPolyEffect::Create(edgeType, rrect.getBounds());
721 if (rrect.isNinePatch()) {
722 return EllipticalRRectEffect::Create(edgeType, rrect);