#include <round_rect.h>
Public Member Functions | |
| RoundRect ()=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. | |
| RoundRect | Shift (Scalar dx, Scalar dy) const |
| Returns a new round rectangle translated by the given offset. | |
| RoundRect | Expand (Scalar left, Scalar top, Scalar right, Scalar bottom) const |
| Returns a round rectangle with expanded edges. Negative expansion results in shrinking. | |
| RoundRect | Expand (Scalar horizontal, Scalar vertical) const |
| Returns a round rectangle with expanded edges. Negative expansion results in shrinking. | |
| RoundRect | Expand (Scalar amount) const |
| Returns a round rectangle with expanded edges. Negative expansion results in shrinking. | |
| constexpr bool | operator== (const RoundRect &rr) const |
Static Public Member Functions | |
| static RoundRect | MakeRect (const Rect &rect) |
| static RoundRect | MakeOval (const Rect &rect) |
| static RoundRect | MakeRectRadius (const Rect &rect, Scalar radius) |
| static RoundRect | MakeRectXY (const Rect &rect, Scalar x_radius, Scalar y_radius) |
| static RoundRect | MakeRectXY (const Rect &rect, Size corner_radii) |
| static RoundRect | MakeNinePatch (const Rect &rect, Scalar left, Scalar top, Scalar right, Scalar bottom) |
| static RoundRect | MakeRectRadii (const Rect &rect, const RoundingRadii &radii) |
Friends | |
| class | RoundRectPathSource |
| class | DiffRoundRectPathSource |
Definition at line 16 of file round_rect.h.
|
default |
Referenced by MakeRectRadii().
| bool impeller::RoundRect::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 73 of file round_rect.cc.
References impeller::RoundingRadii::bottom_left, impeller::RoundingRadii::bottom_right, impeller::TRect< T >::Contains(), impeller::CornerContains(), impeller::TRect< T >::GetLeftBottom(), impeller::TRect< T >::GetLeftTop(), impeller::TRect< T >::GetRightBottom(), impeller::TRect< T >::GetRightTop(), impeller::kLowerLeftDirection(), impeller::kLowerRightDirection(), impeller::kUpperLeftDirection(), impeller::kUpperRightDirection(), impeller::RoundingRadii::top_left, and impeller::RoundingRadii::top_right.
Returns a round rectangle with expanded edges. Negative expansion results in shrinking.
Definition at line 120 of file round_rect.h.
References impeller::TRect< T >::Expand(), and MakeRectRadii().
Returns a round rectangle with expanded edges. Negative expansion results in shrinking.
Definition at line 110 of file round_rect.h.
References impeller::TRect< T >::Expand(), and MakeRectRadii().
|
inline |
Returns a round rectangle with expanded edges. Negative expansion results in shrinking.
Definition at line 98 of file round_rect.h.
References impeller::TRect< T >::Expand(), and MakeRectRadii().
Referenced by impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), and impeller::testing::TEST().
|
inlineconstexpr |
Definition at line 53 of file round_rect.h.
Referenced by flutter::testing::BM_DrawDRRect(), flutter::testing::BM_DrawRRect(), flutter::ClipRRectLayer::clip_shape_bounds(), impeller::DlDispatcherBase::clipPath(), flutter::DisplayListBuilder::ClipRoundRect(), impeller::DlDispatcherBase::clipRoundRect(), flutter::DisplayListMatrixClipState::clipRRect(), flutter::ConvertMutation(), impeller::FillRoundRectGeometry::CoversArea(), impeller::Canvas::DrawRoundRect(), flutter::PlatformViewAndroidJNIImpl::FlutterViewOnDisplayPlatformView(), impeller::RoundRectPathSource::GetBounds(), impeller::DiffRoundRectPathSource::GetBounds(), flutter::PlatformViewAndroidJNIImpl::onDisplayPlatformView2(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), flutter::ToSkRRect(), and flutter::DisplayListMatrixClipState::TransformedRRectCoversBounds().
|
inlineconstexpr |
Definition at line 55 of file round_rect.h.
Referenced by impeller::DlDispatcherBase::clipPath(), impeller::DlDispatcherBase::clipRoundRect(), flutter::DisplayListMatrixClipState::clipRRect(), flutter::ConvertMutation(), impeller::FillRoundRectGeometry::CoversArea(), impeller::Canvas::DrawRoundRect(), flutter::PlatformViewAndroidJNIImpl::FlutterViewOnDisplayPlatformView(), flutter::PlatformViewAndroidJNIImpl::onDisplayPlatformView2(), impeller::DlDispatcherBase::SimplifyOrDrawPath(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), flutter::ToSkRRect(), and flutter::DisplayListMatrixClipState::TransformedRRectCoversBounds().
|
inlineconstexpr |
Definition at line 65 of file round_rect.h.
References impeller::TRect< T >::IsEmpty().
Referenced by impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), and flutter::DisplayListMatrixClipState::TransformedRRectCoversBounds().
|
inlineconstexpr |
Definition at line 57 of file round_rect.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(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), and impeller::testing::TEST().
|
inlineconstexpr |
Definition at line 71 of file round_rect.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 flutter::DisplayListBuilder::ClipRoundRect(), impeller::DlDispatcherBase::clipRoundRect(), flutter::DisplayListMatrixClipState::clipRRect(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), and flutter::DisplayListMatrixClipState::TransformedRRectCoversBounds().
|
inlineconstexpr |
Definition at line 67 of file round_rect.h.
References impeller::RoundingRadii::AreAllCornersEmpty(), and impeller::TRect< T >::IsEmpty().
Referenced by flutter::DisplayListBuilder::ClipRoundRect(), impeller::DlDispatcherBase::clipRoundRect(), flutter::DisplayListMatrixClipState::clipRRect(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), and flutter::DisplayListMatrixClipState::TransformedRRectCoversBounds().
|
inlinestatic |
Definition at line 42 of file round_rect.h.
References impeller::RoundingRadii::MakeNinePatch(), and MakeRectRadii().
Definition at line 23 of file round_rect.h.
References impeller::TRect< T >::GetSize(), impeller::RoundingRadii::MakeRadii(), and MakeRectRadii().
Referenced by flutter::ClipPathLayer::ApplyClip(), impeller::testing::TEST(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), and flutter::testing::TEST_P().
Definition at line 19 of file round_rect.h.
References MakeRectRadii().
Referenced by flutter::testing::ReadbackResult(), flutter::testing::TEST(), flutter::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), and flutter::testing::TEST_F().
|
static |
Definition at line 9 of file round_rect.cc.
References impeller::TRect< T >::GetPositive(), impeller::TRect< T >::IsFinite(), RoundRect(), and impeller::RoundingRadii::Scaled().
Referenced by flutter::testing::BM_DrawDRRect(), flutter::testing::BM_DrawRRect(), impeller::interop::DisplayListBuilder::ClipRoundedRect(), Skwasm::createDlRRect(), impeller::interop::DisplayListBuilder::DrawRoundedRect(), impeller::interop::DisplayListBuilder::DrawRoundedRectDifference(), Expand(), Expand(), Expand(), tonic::DartConverter< flutter::RRect >::FromDart(), MakeNinePatch(), MakeOval(), MakeRect(), MakeRectRadius(), MakeRectXY(), MakeRectXY(), Shift(), flutter::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::RoundSuperellipse::ToApproximateRoundRect(), and flutter::ToDlRoundRect().
|
inlinestatic |
Definition at line 27 of file round_rect.h.
References impeller::RoundingRadii::MakeRadius(), and MakeRectRadii().
Referenced by impeller::testing::TEST(), impeller::testing::TEST_P(), flutter::testing::TEST_P(), and flutter::testing::TEST_P().
|
inlinestatic |
Definition at line 31 of file round_rect.h.
References impeller::RoundingRadii::MakeRadii(), and MakeRectRadii().
Referenced by impeller::testing::DoGradientOvalStrokeMaskBlur(), impeller::testing::MaskBlurVariantTest(), flutter::testing::CanvasCompareTester::RenderWithClips(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), and flutter::testing::TEST_P().
|
inlinestatic |
Definition at line 38 of file round_rect.h.
References impeller::RoundingRadii::MakeRadii(), and MakeRectRadii().
|
inlineconstexpr |
Definition at line 127 of file round_rect.h.
Returns a new round rectangle translated by the given offset.
Definition at line 89 of file round_rect.h.
References MakeRectRadii(), and impeller::TRect< T >::Shift().
Referenced by flutter::testing::BM_DrawDRRect(), flutter::testing::BM_DrawRRect(), flutter::testing::CreateAllClipOps(), flutter::testing::CreateAllRenderingOps(), impeller::testing::TEST(), and flutter::testing::TEST_P().
|
friend |
Definition at line 142 of file round_rect.h.
|
friend |
Definition at line 141 of file round_rect.h.