5 #ifndef FLUTTER_IMPELLER_ENTITY_GEOMETRY_GEOMETRY_H_
6 #define FLUTTER_IMPELLER_ENTITY_GEOMETRY_GEOMETRY_H_
56 std::optional<Rect> inner_rect = std::nullopt);
62 static std::unique_ptr<Geometry>
MakeCover();
64 static std::unique_ptr<Geometry>
MakeRect(
const Rect& rect);
66 static std::unique_ptr<Geometry>
MakeOval(
const Rect& rect);
70 const StrokeParameters& stroke);
85 const Rect& oval_bounds,
88 const StrokeParameters& stroke);
virtual Scalar ComputeAlphaCoverage(const Matrix &transform) const
static std::unique_ptr< Geometry > MakeFillPath(const flutter::DlPath &path, std::optional< Rect > inner_rect=std::nullopt)
static Scalar ComputeStrokeAlphaCoverage(const Matrix &entity, Scalar stroke_width)
Compute an alpha value to simulate lower coverage of fractional pixel strokes.
virtual GeometryResult::Mode GetResultMode() const
static std::unique_ptr< Geometry > MakeRect(const Rect &rect)
static std::unique_ptr< Geometry > MakeFilledArc(const Rect &oval_bounds, Degrees start, Degrees sweep, bool include_center)
static std::unique_ptr< Geometry > MakeStrokePath(const flutter::DlPath &path, const StrokeParameters &stroke={})
static std::unique_ptr< Geometry > MakeCircle(const Point ¢er, Scalar radius)
virtual GeometryResult GetPositionBuffer(const ContentContext &renderer, const Entity &entity, RenderPass &pass) const =0
virtual bool CanApplyMaskFilter() const
static std::unique_ptr< Geometry > MakeRoundRect(const Rect &rect, const Size &radii)
static GeometryResult ComputePositionGeometry(const ContentContext &renderer, const Tessellator::VertexGenerator &generator, const Entity &entity, RenderPass &pass)
virtual std::optional< Rect > GetCoverage(const Matrix &transform) const =0
virtual bool CoversArea(const Matrix &transform, const Rect &rect) const
Determines if this geometry, transformed by the given transform, will completely cover all surface ar...
static std::unique_ptr< Geometry > MakeLine(const Point &p0, const Point &p1, const StrokeParameters &stroke)
static std::unique_ptr< Geometry > MakeOval(const Rect &rect)
static std::unique_ptr< Geometry > MakeStrokedCircle(const Point ¢er, Scalar radius, Scalar stroke_width)
static std::unique_ptr< Geometry > MakeRoundSuperellipse(const Rect &rect, Scalar corner_radius)
static std::unique_ptr< Geometry > MakeCover()
static std::unique_ptr< Geometry > MakeStrokedArc(const Rect &oval_bounds, Degrees start, Degrees sweep, const StrokeParameters &stroke)
virtual bool IsAxisAlignedRect() const
Render passes encode render commands directed as one specific render target into an underlying comman...
An object which produces a list of vertices as |Point|s that tessellate a previously provided shape a...
@ kNone
Does not use the index buffer.
PrimitiveType
Decides how backend draws pixels based on input vertices.
static const GeometryResult kEmptyResult
static constexpr Scalar kMinStrokeSize
@ kNormal
The geometry has no overlapping triangles.
VertexBuffer vertex_buffer
A 4x4 matrix using column-major storage.
A structure to store all of the parameters related to stroking a path or basic geometry object.