51 {
52
53 SkMatrix localToDevice = localToDeviceTransform;
54
56 return MakeRect(recorder, localToDevice, deviceSigma, srcRRect.
rect());
57 }
58
60 const bool devRRectIsValid = srcRRect.
transform(localToDevice, &devRRect);
62 return MakeCircle(recorder, localToDevice, deviceSigma, srcRRect.
rect(), devRRect.
rect());
63 }
64
65
66
70 const float devRadius = localToDevice.
mapVector(0.0f, srcRect.
width() / 2.0f).length();
71 const SkRect devRect = {devCenter.
x() - devRadius,
72 devCenter.
y() - devRadius,
73 devCenter.
x() + devRadius,
74 devCenter.
y() + devRadius};
75 return MakeCircle(recorder, localToDevice, deviceSigma, srcRect, devRect);
76 }
77
80 return MakeRRect(recorder, localToDevice, deviceSigma, srcRRect, devRRect);
81 }
82
83 return std::nullopt;
84}
bool preservesRightAngles(SkScalar tol=SK_ScalarNearlyZero) const
SkPoint mapPoint(SkPoint pt) const
bool isScaleTranslate() const
bool isSimilarity(SkScalar tol=SK_ScalarNearlyZero) const
void mapVector(SkScalar dx, SkScalar dy, SkVector *result) const
static bool IsSimpleCircular(const SkRRect &rr)
static bool IsCircle(const SkRRect &rr)
const SkRect & rect() const
bool transform(const SkMatrix &matrix, SkRRect *dst) const
constexpr float y() const
constexpr float x() const
constexpr float width() const
constexpr SkPoint center() const