 |
Flutter Impeller
|
|
Go to the documentation of this file.
5 #ifndef FLUTTER_IMPELLER_ENTITY_GEOMETRY_GEOMETRY_H_
6 #define FLUTTER_IMPELLER_ENTITY_GEOMETRY_GEOMETRY_H_
61 std::optional<Rect> inner_rect = std::nullopt);
70 static std::unique_ptr<Geometry>
MakeCover();
72 static std::unique_ptr<Geometry>
MakeRect(
const Rect& rect);
74 static std::unique_ptr<Geometry>
MakeOval(
const Rect& rect);
91 static std::unique_ptr<Geometry>
MakePointField(std::vector<Point> points,
138 #endif // FLUTTER_IMPELLER_ENTITY_GEOMETRY_GEOMETRY_H_
@ kNormal
The geometry has no overlapping triangles.
virtual Scalar ComputeAlphaCoverage(const Matrix &transform) const
static std::unique_ptr< Geometry > MakeCircle(const Point ¢er, Scalar radius)
static constexpr Scalar kMinStrokeSizeMSAA
The minimum stroke size can be less than one physical pixel because of MSAA, but no less that half a ...
virtual std::optional< Rect > GetCoverage(const Matrix &transform) const =0
virtual bool CanApplyMaskFilter() const
static std::unique_ptr< Geometry > MakeOval(const Rect &rect)
virtual bool IsAxisAlignedRect() const
virtual GeometryResult::Mode GetResultMode() const
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...
const Scalar stroke_width
static constexpr Scalar kMinStrokeSize
static GeometryResult ComputePositionGeometry(const ContentContext &renderer, const Tessellator::VertexGenerator &generator, const Entity &entity, RenderPass &pass)
An object which produces a list of vertices as |Point|s that tessellate a previously provided shape a...
PrimitiveType
Decides how backend draws pixels based on input vertices.
virtual GeometryResult GetPositionBuffer(const ContentContext &renderer, const Entity &entity, RenderPass &pass) const =0
Paths are lightweight objects that describe a collection of linear, quadratic, or cubic segments....
static std::unique_ptr< Geometry > MakeStrokePath(const Path &path, Scalar stroke_width=0.0, Scalar miter_limit=4.0, Cap stroke_cap=Cap::kButt, Join stroke_join=Join::kMiter)
static std::unique_ptr< Geometry > MakeStrokedCircle(const Point ¢er, Scalar radius, Scalar stroke_width)
@ kNone
Does not use the index buffer.
static std::unique_ptr< Geometry > MakeRoundRect(const Rect &rect, const Size &radii)
static std::unique_ptr< Geometry > MakeCover()
Render passes encode render commands directed as one specific render target into an underlying comman...
static std::unique_ptr< Geometry > MakeRect(const Rect &rect)
static std::unique_ptr< Geometry > MakePointField(std::vector< Point > points, Scalar radius, bool round)
static const GeometryResult kEmptyResult
static std::unique_ptr< Geometry > MakeLine(const Point &p0, const Point &p1, Scalar width, Cap cap)
static std::unique_ptr< Geometry > MakeFillPath(const Path &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.
VertexBuffer vertex_buffer
A 4x4 matrix using column-major storage.