#include <rect.h>
Public Types | |
| using | Type = T |
Public Member Functions | |
| constexpr | TRect () |
| constexpr | TRect (TSize< Type > size) |
| constexpr | TRect (TPoint< Type > origin, TSize< Type > size) |
| constexpr | TRect (const Type components[4]) |
| constexpr | TRect (Type x, Type y, Type width, Type height) |
| template<class U > | |
| constexpr | TRect (const TRect< U > &other) |
| constexpr TRect | operator+ (const TRect &r) const |
| constexpr TRect | operator- (const TRect &r) const |
| constexpr TRect | operator* (Type scale) const |
| constexpr TRect | operator* (const TRect &r) const |
| constexpr bool | operator== (const TRect &r) const |
| constexpr TRect | Scale (Type scale) const |
| constexpr TRect | Scale (TPoint< T > scale) const |
| constexpr TRect | Scale (TSize< T > scale) const |
| constexpr bool | Contains (const TPoint< Type > &p) const |
| constexpr bool | Contains (const TRect &o) const |
| constexpr bool | IsZero () const |
| constexpr bool | IsEmpty () const |
| constexpr bool | IsMaximum () const |
| constexpr auto | GetLeft () const |
| constexpr auto | GetTop () const |
| constexpr auto | GetRight () const |
| constexpr auto | GetBottom () const |
| constexpr TPoint< T > | GetLeftTop () const |
| constexpr TPoint< T > | GetRightTop () const |
| constexpr TPoint< T > | GetLeftBottom () const |
| constexpr TPoint< T > | GetRightBottom () const |
| constexpr std::array< T, 4 > | GetLTRB () const |
| constexpr TRect | GetPositive () const |
| Get a version of this rectangle that has a non-negative size. More... | |
| constexpr std::array< TPoint< T >, 4 > | GetPoints () const |
| Get the points that represent the 4 corners of this rectangle. The order is: Top left, top right, bottom left, bottom right. More... | |
| constexpr std::array< TPoint< T >, 4 > | GetTransformedPoints (const Matrix &transform) const |
| constexpr TRect | TransformBounds (const Matrix &transform) const |
| Creates a new bounding box that contains this transformed rectangle. More... | |
| constexpr TRect | Union (const TRect &o) const |
| constexpr std::optional< TRect< T > > | Intersection (const TRect &o) const |
| constexpr bool | IntersectsWithRect (const TRect &o) const |
| constexpr std::optional< TRect< T > > | Cutout (const TRect &o) const |
| Returns the new boundary rectangle that would result from the rectangle being cutout by a second rectangle. More... | |
| constexpr TRect< T > | Shift (TPoint< T > offset) const |
| Returns a new rectangle translated by the given offset. More... | |
| constexpr TRect< T > | Expand (T left, T top, T right, T bottom) const |
| Returns a rectangle with expanded edges. Negative expansion results in shrinking. More... | |
| constexpr TRect< T > | Expand (T amount) const |
| Returns a rectangle with expanded edges in all directions. Negative expansion results in shrinking. More... | |
| constexpr TRect< T > | Project (TRect< T > source) const |
| Returns a new rectangle that represents the projection of the source rectangle onto this rectangle. In other words, the source rectangle is redefined in terms of the corrdinate space of this rectangle. More... | |
Static Public Member Functions | |
| constexpr static TRect | MakeLTRB (Type left, Type top, Type right, Type bottom) |
| constexpr static TRect | MakeXYWH (Type x, Type y, Type width, Type height) |
| template<class U > | |
| constexpr static TRect | MakeSize (const TSize< U > &size) |
| template<typename PointIter > | |
| constexpr static std::optional< TRect > | MakePointBounds (const PointIter first, const PointIter last) |
| constexpr static TRect | MakeMaximum () |
Public Attributes | |
| TPoint< Type > | origin |
| TSize< Type > | size |
| using impeller::TRect< T >::Type = T |
|
inlineconstexpr |
Definition at line 26 of file rect.h.
Referenced by impeller::TRect< Scalar >::Expand(), impeller::TRect< Scalar >::MakeLTRB(), impeller::TRect< Scalar >::MakeSize(), impeller::TRect< Scalar >::MakeXYWH(), impeller::TRect< Scalar >::operator*(), impeller::TRect< Scalar >::operator+(), impeller::TRect< Scalar >::operator-(), impeller::TRect< Scalar >::Scale(), and impeller::TRect< Scalar >::Shift().
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineexplicitconstexpr |
|
inlineconstexpr |
Definition at line 122 of file rect.h.
Referenced by impeller::RectGeometry::CoversArea(), impeller::FillPathGeometry::CoversArea(), and impeller::testing::TEST().
|
inlineconstexpr |
|
inlineconstexpr |
Returns the new boundary rectangle that would result from the rectangle being cutout by a second rectangle.
Definition at line 240 of file rect.h.
Referenced by impeller::testing::TEST().
|
inlineconstexpr |
|
inlineconstexpr |
Returns a rectangle with expanded edges. Negative expansion results in shrinking.
Definition at line 279 of file rect.h.
Referenced by impeller::Canvas::ClipRRect().
|
inlineconstexpr |
Definition at line 158 of file rect.h.
Referenced by impeller::Canvas::Canvas(), impeller::Canvas::ClipRRect(), impeller::TRect< Scalar >::Contains(), impeller::DlDispatcher::drawDisplayList(), impeller::NinePatchConverter::DrawNinePatch(), impeller::TRect< Scalar >::GetLeftBottom(), impeller::TRect< Scalar >::GetLTRB(), and impeller::TRect< Scalar >::GetRightBottom().
|
inlineconstexpr |
Definition at line 137 of file rect.h.
Referenced by impeller::Canvas::Canvas(), impeller::Canvas::ClipRRect(), impeller::TRect< Scalar >::Contains(), impeller::DlDispatcher::drawDisplayList(), impeller::DrawGlyph(), impeller::NinePatchConverter::DrawNinePatch(), impeller::TRect< Scalar >::GetLeftBottom(), impeller::TRect< Scalar >::GetLeftTop(), and impeller::TRect< Scalar >::GetLTRB().
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
Definition at line 175 of file rect.h.
Referenced by impeller::TRect< Scalar >::Cutout(), impeller::TRect< Scalar >::GetPoints(), impeller::TRect< Scalar >::GetPositive(), impeller::TRect< Scalar >::Intersection(), and impeller::TRect< Scalar >::Union().
|
inlineconstexpr |
Get the points that represent the 4 corners of this rectangle. The order is: Top left, top right, bottom left, bottom right.
Definition at line 187 of file rect.h.
Referenced by impeller::ComputeUVGeometryForRect(), impeller::TRect< Scalar >::GetTransformedPoints(), impeller::ClipContents::Render(), and impeller::testing::TEST().
|
inlineconstexpr |
Get a version of this rectangle that has a non-negative size.
Definition at line 180 of file rect.h.
Referenced by impeller::testing::TEST().
|
inlineconstexpr |
Definition at line 151 of file rect.h.
Referenced by impeller::Canvas::Canvas(), impeller::Canvas::ClipRRect(), impeller::TRect< Scalar >::Contains(), impeller::DlDispatcher::drawDisplayList(), impeller::NinePatchConverter::DrawNinePatch(), impeller::TRect< Scalar >::GetLTRB(), impeller::TRect< Scalar >::GetRightBottom(), and impeller::TRect< Scalar >::GetRightTop().
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
Definition at line 144 of file rect.h.
Referenced by impeller::Canvas::Canvas(), impeller::Canvas::ClipRRect(), impeller::TRect< Scalar >::Contains(), impeller::DlDispatcher::drawDisplayList(), impeller::DrawGlyph(), impeller::NinePatchConverter::DrawNinePatch(), impeller::TRect< Scalar >::GetLeftTop(), impeller::TRect< Scalar >::GetLTRB(), and impeller::TRect< Scalar >::GetRightTop().
|
inlineconstexpr |
Definition at line 193 of file rect.h.
Referenced by impeller::Snapshot::GetCoverageUVs(), impeller::AtlasContents::Render(), impeller::AtlasTextureContents::Render(), impeller::AtlasColorContents::Render(), impeller::testing::TEST(), and impeller::TRect< Scalar >::TransformBounds().
|
inlineconstexpr |
Definition at line 219 of file rect.h.
Referenced by impeller::AdvancedBlend(), impeller::TRect< Scalar >::IntersectsWithRect(), impeller::PipelineBlend(), and impeller::testing::TEST().
|
inlineconstexpr |
Definition at line 234 of file rect.h.
Referenced by impeller::testing::TEST().
|
inlineconstexpr |
Definition at line 133 of file rect.h.
Referenced by impeller::NinePatchConverter::DrawNinePatch(), and impeller::TextureContents::Render().
|
inlineconstexpr |
Definition at line 135 of file rect.h.
Referenced by impeller::TRect< Scalar >::GetBottom(), impeller::TRect< Scalar >::GetLeft(), impeller::TRect< Scalar >::GetRight(), and impeller::TRect< Scalar >::GetTop().
|
inlineconstexpr |
|
inlinestaticconstexpr |
Definition at line 40 of file rect.h.
Referenced by impeller::TRect< Scalar >::Cutout(), impeller::TRect< Scalar >::GetPositive(), impeller::TRect< Scalar >::Intersection(), impeller::TRect< Scalar >::MakeMaximum(), impeller::TRect< Scalar >::MakePointBounds(), and impeller::TRect< Scalar >::Union().
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
Returns a new rectangle that represents the projection of the source rectangle onto this rectangle. In other words, the source rectangle is redefined in terms of the corrdinate space of this rectangle.
Definition at line 299 of file rect.h.
Referenced by impeller::TextureContents::Render().
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
Definition at line 108 of file rect.h.
Referenced by impeller::MakeTextFrameFromTextBlobSkia(), impeller::TRect< Scalar >::operator*(), and impeller::TRect< Scalar >::Scale().
|
inlineconstexpr |
|
inlineconstexpr |
Creates a new bounding box that contains this transformed rectangle.
Definition at line 204 of file rect.h.
Referenced by impeller::RectGeometry::CoversArea(), impeller::FillPathGeometry::CoversArea(), impeller::TextureFilterInput::GetCoverage(), impeller::Snapshot::GetCoverage(), impeller::SolidRRectBlurContents::GetCoverage(), impeller::VerticesGeometry::GetCoverage(), impeller::TextureContents::GetCoverage(), impeller::AtlasContents::GetCoverage(), impeller::AtlasTextureContents::GetCoverage(), impeller::AtlasColorContents::GetCoverage(), impeller::MatrixFilterContents::GetFilterCoverage(), and impeller::testing::TEST_P().
|
inlineconstexpr |
Definition at line 209 of file rect.h.
Referenced by impeller::TRect< Scalar >::Contains(), and impeller::testing::TEST().
| TPoint<Type> impeller::TRect< T >::origin |
Definition at line 23 of file rect.h.
Referenced by impeller::PathBuilder::AddArc(), impeller::PathBuilder::AddOval(), impeller::PathBuilder::AddRect(), impeller::PathBuilder::AddRoundedRect(), impeller::AdvancedBlend(), impeller::ComputeUVGeometryForRect(), impeller::DrawGlyph(), impeller::BlitCopyTextureToTextureCommandGLES::Encode(), impeller::BlitCopyTextureToTextureCommandMTL::Encode(), impeller::BlitCopyTextureToTextureCommandVK::Encode(), impeller::BlitCopyTextureToBufferCommandGLES::Encode(), impeller::BlitCopyTextureToBufferCommandMTL::Encode(), impeller::BlitCopyTextureToBufferCommandVK::Encode(), impeller::TRect< Scalar >::Expand(), impeller::TRect< Scalar >::GetBottom(), impeller::BorderMaskBlurFilterContents::GetFilterCoverage(), impeller::DirectionalMorphologyFilterContents::GetFilterCoverage(), impeller::DirectionalGaussianBlurFilterContents::GetFilterCoverage(), impeller::TRect< Scalar >::GetLeft(), impeller::VerticesGeometry::GetPositionUVBuffer(), impeller::TRect< Scalar >::GetRight(), impeller::TRect< Scalar >::GetTop(), impeller::AtlasBlenderKey::Hash::operator()(), impeller::TRect< Scalar >::operator*(), impeller::TRect< Scalar >::operator+(), impeller::TRect< Scalar >::operator-(), std::operator<<(), impeller::TRect< Scalar >::operator==(), impeller::PipelineBlend(), impeller::TRect< Scalar >::Project(), RectNear(), impeller::TextContents::Render(), impeller::TRect< Scalar >::Scale(), impeller::PassBindingsCache::SetScissor(), impeller::PassBindingsCache::SetViewport(), impeller::TRect< Scalar >::Shift(), and impeller::testing::TEST().
| TSize<Type> impeller::TRect< T >::size |
Definition at line 24 of file rect.h.
Referenced by impeller::PathBuilder::AddArc(), impeller::PathBuilder::AddOval(), impeller::PathBuilder::AddRect(), impeller::PathBuilder::AddRoundedRect(), impeller::AdvancedBlend(), impeller::CanAppendToExistingAtlas(), impeller::Canvas::ClipRRect(), impeller::ComputeUVGeometryForRect(), impeller::TRect< Scalar >::Contains(), impeller::DrawGlyph(), impeller::Canvas::DrawImageRect(), impeller::BlitCopyTextureToTextureCommandGLES::Encode(), impeller::BlitCopyTextureToTextureCommandMTL::Encode(), impeller::BlitCopyTextureToTextureCommandVK::Encode(), impeller::BlitCopyTextureToBufferCommandGLES::Encode(), impeller::BlitCopyTextureToBufferCommandMTL::Encode(), impeller::BlitCopyTextureToBufferCommandVK::Encode(), impeller::TRect< Scalar >::Expand(), impeller::TRect< Scalar >::GetBottom(), impeller::BorderMaskBlurFilterContents::GetFilterCoverage(), impeller::DirectionalMorphologyFilterContents::GetFilterCoverage(), impeller::DirectionalGaussianBlurFilterContents::GetFilterCoverage(), impeller::TRect< Scalar >::GetLeft(), impeller::VerticesGeometry::GetPositionUVBuffer(), impeller::TRect< Scalar >::GetRight(), impeller::TRect< Scalar >::GetTop(), impeller::TRect< Scalar >::IsEmpty(), impeller::TRect< Scalar >::IsZero(), impeller::TRect< Scalar >::MakeSize(), impeller::AtlasBlenderKey::Hash::operator()(), impeller::TRect< Scalar >::operator*(), impeller::TRect< Scalar >::operator+(), impeller::TRect< Scalar >::operator-(), std::operator<<(), impeller::TRect< Scalar >::operator==(), impeller::PipelineBlend(), impeller::TRect< Scalar >::Project(), RectNear(), impeller::TextContents::Render(), impeller::TextureContents::Render(), impeller::TRect< Scalar >::Scale(), impeller::PassBindingsCache::SetScissor(), impeller::PassBindingsCache::SetViewport(), impeller::TRect< Scalar >::Shift(), and impeller::testing::TEST().