#include <rounding_radii.h>
Public Member Functions | |
constexpr bool | IsFinite () const |
constexpr bool | AreAllCornersEmpty () const |
constexpr bool | AreAllCornersSame (Scalar tolerance=kEhCloseEnough) const |
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 exceed the width or height of the given bounds. More... | |
constexpr RoundingRadii | operator* (Scalar scale) |
constexpr bool | operator== (const RoundingRadii &rr) const |
constexpr bool | operator!= (const RoundingRadii &rr) const |
Static Public Member Functions | |
constexpr static RoundingRadii | MakeRadius (Scalar radius) |
constexpr static RoundingRadii | MakeRadii (Size radii) |
constexpr static RoundingRadii | MakeNinePatch (Scalar left, Scalar top, Scalar right, Scalar bottom) |
Public Attributes | |
Size | top_left |
Size | top_right |
Size | bottom_left |
Size | bottom_right |
Definition at line 14 of file rounding_radii.h.
|
inlineconstexpr |
Definition at line 47 of file rounding_radii.h.
References bottom_left, bottom_right, impeller::TSize< T >::IsEmpty(), top_left, and top_right.
Referenced by impeller::RoundRect::IsRect(), impeller::RoundSuperellipse::IsRect(), Scaled(), and impeller::testing::TEST().
|
inlineconstexpr |
Definition at line 54 of file rounding_radii.h.
References bottom_left, bottom_right, impeller::TSize< T >::height, impeller::ScalarNearlyEqual(), top_left, top_right, and impeller::TSize< T >::width.
Referenced by impeller::RoundRect::IsOval(), impeller::RoundSuperellipse::IsOval(), impeller::RoundSuperellipseParam::MakeBoundsRadii(), and impeller::testing::TEST().
|
inlineconstexpr |
Definition at line 40 of file rounding_radii.h.
References bottom_left, bottom_right, impeller::TSize< T >::IsFinite(), top_left, and top_right.
Referenced by Scaled(), and impeller::testing::TEST().
|
inlinestaticconstexpr |
Definition at line 28 of file rounding_radii.h.
References top_left.
Referenced by impeller::RoundRect::MakeNinePatch().
|
inlinestaticconstexpr |
Definition at line 24 of file rounding_radii.h.
Referenced by impeller::RoundRect::MakeOval(), impeller::RoundSuperellipse::MakeOval(), impeller::RoundRect::MakeRectXY(), impeller::RoundSuperellipse::MakeRectXY(), and impeller::testing::TEST().
|
inlinestaticconstexpr |
Definition at line 20 of file rounding_radii.h.
Referenced by impeller::RoundRect::MakeRectRadius(), impeller::RoundSuperellipse::MakeRectRadius(), and impeller::testing::TEST().
|
inlineconstexpr |
Definition at line 88 of file rounding_radii.h.
|
inlineconstexpr |
Definition at line 72 of file rounding_radii.h.
References bottom_left, bottom_right, top_left, and top_right.
|
inlineconstexpr |
Definition at line 81 of file rounding_radii.h.
References bottom_left, bottom_right, top_left, and top_right.
RoundingRadii impeller::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 exceed the width or height of the given bounds.
See the Skia scaling implementation for more details.
Definition at line 26 of file rounding_radii.cc.
References impeller::AdjustScale(), AreAllCornersEmpty(), bottom_left, bottom_right, impeller::TRect< T >::GetPositive(), impeller::TRect< T >::GetSize(), impeller::TSize< T >::height, impeller::TRect< T >::IsEmpty(), IsFinite(), impeller::NormalizeEmptyToZero(), top_left, top_right, and impeller::TSize< T >::width.
Referenced by impeller::RoundRect::MakeRectRadii(), and impeller::RoundSuperellipse::MakeRectRadii().
Size impeller::RoundingRadii::bottom_left |
Definition at line 17 of file rounding_radii.h.
Referenced by AreAllCornersEmpty(), AreAllCornersSame(), impeller::RoundRect::Contains(), impeller::FillRoundRectGeometry::CoversArea(), impeller::RoundSuperellipseGeometry::CoversArea(), impeller::RoundRect::IsFinite(), impeller::RoundSuperellipse::IsFinite(), IsFinite(), impeller::RoundSuperellipseParam::MakeBoundsRadii(), operator*(), std::operator<<(), operator==(), Scaled(), impeller::testing::TEST(), and impeller::interop::ToSkiaType().
Size impeller::RoundingRadii::bottom_right |
Definition at line 18 of file rounding_radii.h.
Referenced by AreAllCornersEmpty(), AreAllCornersSame(), impeller::RoundRect::Contains(), impeller::FillRoundRectGeometry::CoversArea(), impeller::RoundSuperellipseGeometry::CoversArea(), impeller::RoundRect::IsFinite(), impeller::RoundSuperellipse::IsFinite(), IsFinite(), impeller::RoundSuperellipseParam::MakeBoundsRadii(), operator*(), std::operator<<(), operator==(), Scaled(), impeller::testing::TEST(), and impeller::interop::ToSkiaType().
Size impeller::RoundingRadii::top_left |
Definition at line 15 of file rounding_radii.h.
Referenced by AreAllCornersEmpty(), AreAllCornersSame(), impeller::RoundRect::Contains(), impeller::FillRoundRectGeometry::CoversArea(), impeller::RoundSuperellipseGeometry::CoversArea(), impeller::RoundRect::IsFinite(), impeller::RoundSuperellipse::IsFinite(), IsFinite(), impeller::RoundRect::IsOval(), impeller::RoundSuperellipse::IsOval(), impeller::RoundSuperellipseParam::MakeBoundsRadii(), MakeNinePatch(), operator*(), std::operator<<(), operator==(), Scaled(), impeller::testing::TEST(), impeller::testing::TEST_P(), impeller::interop::ToImpellerType(), and impeller::interop::ToSkiaType().
Size impeller::RoundingRadii::top_right |
Definition at line 16 of file rounding_radii.h.
Referenced by AreAllCornersEmpty(), AreAllCornersSame(), impeller::RoundRect::Contains(), impeller::FillRoundRectGeometry::CoversArea(), impeller::RoundSuperellipseGeometry::CoversArea(), impeller::RoundRect::IsFinite(), impeller::RoundSuperellipse::IsFinite(), IsFinite(), impeller::RoundSuperellipseParam::MakeBoundsRadii(), operator*(), std::operator<<(), operator==(), Scaled(), impeller::testing::TEST(), and impeller::interop::ToSkiaType().