#include <round_superellipse.h>
Public Member Functions | |
| RoundSuperellipse ()=default | |
| constexpr const Rect & | GetBounds () const |
| constexpr const RoundingRadii & | GetRadii () const |
| constexpr bool | IsFinite () const |
| constexpr bool | IsEmpty () const |
| constexpr bool | IsRect () const |
| constexpr bool | IsOval () const |
| bool | Contains (const Point &p) const |
| Returns true iff the provided point |p| is inside the half-open interior of this rectangle. More... | |
| constexpr RoundSuperellipse | Shift (Scalar dx, Scalar dy) const |
| Returns a new round rectangle translated by the given offset. More... | |
| constexpr RoundSuperellipse | Expand (Scalar left, Scalar top, Scalar right, Scalar bottom) const |
| Returns a round rectangle with expanded edges. Negative expansion results in shrinking. More... | |
| constexpr RoundSuperellipse | Expand (Scalar horizontal, Scalar vertical) const |
| Returns a round rectangle with expanded edges. Negative expansion results in shrinking. More... | |
| constexpr RoundSuperellipse | Expand (Scalar amount) const |
| Returns a round rectangle with expanded edges. Negative expansion results in shrinking. More... | |
| constexpr bool | operator== (const RoundSuperellipse &rr) const |
| constexpr bool | operator!= (const RoundSuperellipse &r) const |
| RoundRect | ToApproximateRoundRect () const |
Static Public Member Functions | |
| constexpr static RoundSuperellipse | MakeRect (const Rect &rect) |
| constexpr static RoundSuperellipse | MakeOval (const Rect &rect) |
| constexpr static RoundSuperellipse | MakeRectRadius (const Rect &rect, Scalar radius) |
| constexpr static RoundSuperellipse | MakeRectXY (const Rect &rect, Scalar x_radius, Scalar y_radius) |
| constexpr static RoundSuperellipse | MakeRectXY (const Rect &rect, Size corner_radii) |
| static RoundSuperellipse | MakeRectRadii (const Rect &rect, const RoundingRadii &radii) |
Definition at line 17 of file round_superellipse.h.
|
default |
Referenced by MakeRectRadii().
| bool impeller::RoundSuperellipse::Contains | ( | const Point & | p | ) | const |
Returns true iff the provided point |p| is inside the half-open interior of this rectangle.
For purposes of containment, a rectangle contains points along the top and left edges but not points along the right and bottom edges so that a point is only ever considered inside one of two abutting rectangles.
Definition at line 26 of file round_superellipse.cc.
References impeller::TRect< T >::Contains(), and impeller::RoundSuperellipseParam::MakeBoundsRadii().
|
inlineconstexpr |
Returns a round rectangle with expanded edges. Negative expansion results in shrinking.
Definition at line 114 of file round_superellipse.h.
References impeller::TRect< T >::Expand(), and MakeRectRadii().
|
inlineconstexpr |
Returns a round rectangle with expanded edges. Negative expansion results in shrinking.
Definition at line 104 of file round_superellipse.h.
References impeller::TRect< T >::Expand(), and MakeRectRadii().
|
inlineconstexpr |
Returns a round rectangle with expanded edges. Negative expansion results in shrinking.
Definition at line 92 of file round_superellipse.h.
References impeller::TRect< T >::Expand(), and MakeRectRadii().
Referenced by impeller::testing::TEST().
|
inlineconstexpr |
Definition at line 48 of file round_superellipse.h.
Referenced by impeller::PathBuilder::AddRoundSuperellipse(), impeller::Canvas::DrawRoundSuperellipse(), std::operator<<(), impeller::testing::TEST(), and ToApproximateRoundRect().
|
inlineconstexpr |
Definition at line 49 of file round_superellipse.h.
Referenced by impeller::PathBuilder::AddRoundSuperellipse(), impeller::Canvas::DrawRoundSuperellipse(), std::operator<<(), impeller::testing::TEST(), and ToApproximateRoundRect().
|
inlineconstexpr |
Definition at line 59 of file round_superellipse.h.
References impeller::TRect< T >::IsEmpty().
Referenced by impeller::testing::TEST().
|
inlineconstexpr |
Definition at line 51 of file round_superellipse.h.
References impeller::RoundingRadii::bottom_left, impeller::RoundingRadii::bottom_right, impeller::TRect< T >::IsFinite(), impeller::TSize< T >::IsFinite(), impeller::RoundingRadii::top_left, and impeller::RoundingRadii::top_right.
Referenced by impeller::testing::TEST().
|
inlineconstexpr |
Definition at line 65 of file round_superellipse.h.
References impeller::RoundingRadii::AreAllCornersSame(), impeller::TRect< T >::GetHeight(), impeller::TRect< T >::GetWidth(), impeller::TSize< T >::height, impeller::TRect< T >::IsEmpty(), impeller::ScalarNearlyEqual(), impeller::RoundingRadii::top_left, and impeller::TSize< T >::width.
Referenced by impeller::PathBuilder::AddRoundSuperellipse(), and impeller::testing::TEST().
|
inlineconstexpr |
Definition at line 61 of file round_superellipse.h.
References impeller::RoundingRadii::AreAllCornersEmpty(), and impeller::TRect< T >::IsEmpty().
Referenced by impeller::PathBuilder::AddRoundSuperellipse(), and impeller::testing::TEST().
|
inlinestaticconstexpr |
Definition at line 24 of file round_superellipse.h.
References impeller::TRect< T >::GetSize(), impeller::RoundingRadii::MakeRadii(), and MakeRectRadii().
Referenced by impeller::testing::TEST().
|
inlinestaticconstexpr |
Definition at line 20 of file round_superellipse.h.
References MakeRectRadii().
Referenced by impeller::testing::TEST().
|
static |
Definition at line 12 of file round_superellipse.cc.
References impeller::TRect< T >::GetPositive(), impeller::TRect< T >::IsFinite(), RoundSuperellipse(), and impeller::RoundingRadii::Scaled().
Referenced by Expand(), MakeOval(), MakeRect(), MakeRectRadius(), MakeRectXY(), Shift(), impeller::testing::TEST(), and impeller::testing::TEST_P().
|
inlinestaticconstexpr |
Definition at line 28 of file round_superellipse.h.
References impeller::RoundingRadii::MakeRadius(), and MakeRectRadii().
Referenced by impeller::testing::TEST().
|
inlinestaticconstexpr |
Definition at line 33 of file round_superellipse.h.
References impeller::RoundingRadii::MakeRadii(), and MakeRectRadii().
Referenced by impeller::testing::TEST().
|
inlinestaticconstexpr |
Definition at line 40 of file round_superellipse.h.
References impeller::RoundingRadii::MakeRadii(), and MakeRectRadii().
|
inlineconstexpr |
Definition at line 125 of file round_superellipse.h.
|
inlineconstexpr |
Definition at line 121 of file round_superellipse.h.
|
inlineconstexpr |
Returns a new round rectangle translated by the given offset.
Definition at line 83 of file round_superellipse.h.
References MakeRectRadii(), and impeller::TRect< T >::Shift().
Referenced by impeller::testing::TEST().
| RoundRect impeller::RoundSuperellipse::ToApproximateRoundRect | ( | ) | const |
Definition at line 34 of file round_superellipse.cc.
References GetBounds(), GetRadii(), and impeller::RoundRect::MakeRectRadii().