 |
Flutter Impeller
|
|
Go to the documentation of this file.
10 : bounds_(bounds), radii_(radii) {}
23 GeometryResult RoundRectGeometry::GetPositionUVBuffer(
24 Rect texture_coverage,
25 Matrix effect_transform,
26 const ContentContext& renderer,
28 RenderPass& pass)
const {
31 renderer.GetTessellator()->FilledRoundRect(entity.GetTransform(), bounds_,
33 texture_coverage.GetNormalizingTransform() * effect_transform, entity,
41 std::optional<Rect> RoundRectGeometry::GetCoverage(
42 const Matrix& transform)
const {
47 const Rect& rect)
const {
53 if (!flat_on_tb && !flat_on_lr) {
bool IsAxisAlignedRect() const override
const Matrix & GetTransform() const
Get the global transform matrix for this Entity.
constexpr TRect TransformBounds(const Matrix &transform) const
Creates a new bounding box that contains this transformed rectangle.
bool CoversArea(const Matrix &transform, const Rect &rect) const override
Determines if this geometry, transformed by the given transform, will completely cover all surface ar...
constexpr Type GetHeight() const
Returns the height of the rectangle, equivalent to |GetSize().height|.
static GeometryResult ComputePositionGeometry(const ContentContext &renderer, const Tessellator::VertexGenerator &generator, const Entity &entity, RenderPass &pass)
static GeometryResult ComputePositionUVGeometry(const ContentContext &renderer, const Tessellator::VertexGenerator &generator, const Matrix &uv_transform, const Entity &entity, RenderPass &pass)
constexpr Type GetWidth() const
Returns the width of the rectangle, equivalent to |GetSize().width|.
constexpr bool IsTranslationScaleOnly() const
Returns true if the matrix has a scale-only basis and is non-projective. Note that an identity matrix...
std::shared_ptr< Tessellator > GetTessellator() 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.
Render passes encode render commands directed as one specific render target into an underlying comman...
A 4x4 matrix using column-major storage.
constexpr TRect< T > Expand(T left, T top, T right, T bottom) const
Returns a rectangle with expanded edges. Negative expansion results in shrinking.
RoundRectGeometry(const Rect &bounds, const Size &radii)