32 const Point& direction,
34 FML_DCHECK(radii.
width >= 0.0f && radii.
height >= 0.0f);
42 Point corner_relative = (corner - p) * direction;
51 Point quadrant_relative = radii - corner_relative;
52 if (quadrant_relative.
x <= 0.0f || quadrant_relative.
y <= 0.0f) {
62 Point quadrant_unit_circle_point = quadrant_relative / radii;
static bool CornerContains(const Point &p, const Point &corner, const Point &direction, const Size &radii)
static constexpr Point kUpperLeftDirection(-1.0f, -1.0f)
static constexpr Point kLowerRightDirection(1.0f, 1.0f)
static constexpr Point kUpperRightDirection(1.0f, -1.0f)
static constexpr Point kLowerLeftDirection(-1.0f, 1.0f)
static RoundRect MakeRectRadii(const Rect &rect, const RoundingRadii &radii)
bool Contains(const Point &p) const
Returns true iff the provided point |p| is inside the half-open interior of this rectangle.
RoundingRadii Scaled(const Rect &bounds) const
Returns a scaled copy of this object, ensuring that the sum of the corner radii on each side does not...
constexpr Type GetLengthSquared() const
constexpr bool Contains(const TPoint< Type > &p) const
Returns true iff the provided point |p| is inside the half-open interior of this rectangle.
constexpr TRect GetPositive() const
Get a version of this rectangle that has a non-negative size.
IsFinite() const
Returns true if all of the fields of this floating point rectangle are finite.
constexpr TPoint< T > GetLeftBottom() const
constexpr TPoint< T > GetRightTop() const
constexpr TPoint< T > GetRightBottom() const
constexpr TPoint< T > GetLeftTop() const
constexpr bool IsEmpty() const
Returns true if either of the width or height are 0, negative, or NaN.