#include <geometry.h>
|
static std::shared_ptr< Geometry > | MakeFillPath (const Path &path, std::optional< Rect > inner_rect=std::nullopt) |
|
static std::shared_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::shared_ptr< Geometry > | MakeCover () |
|
static std::shared_ptr< Geometry > | MakeRect (const Rect &rect) |
|
static std::shared_ptr< Geometry > | MakeOval (const Rect &rect) |
|
static std::shared_ptr< Geometry > | MakeLine (const Point &p0, const Point &p1, Scalar width, Cap cap) |
|
static std::shared_ptr< Geometry > | MakeCircle (const Point ¢er, Scalar radius) |
|
static std::shared_ptr< Geometry > | MakeStrokedCircle (const Point ¢er, Scalar radius, Scalar stroke_width) |
|
static std::shared_ptr< Geometry > | MakeRoundRect (const Rect &rect, const Size &radii) |
|
static std::shared_ptr< Geometry > | MakePointField (std::vector< Point > points, Scalar radius, bool round) |
|
Definition at line 48 of file geometry.h.
◆ CanApplyMaskFilter()
bool impeller::Geometry::CanApplyMaskFilter |
( |
| ) |
const |
|
virtual |
◆ ComputePositionGeometry()
Definition at line 24 of file geometry.cc.
28 {
29 using VT = SolidFillVertexShader::PerVertexData;
30
31 size_t count = generator.GetVertexCount();
32
33 return GeometryResult{
34 .type = generator.GetTriangleType(),
35 .vertex_buffer =
36 {
37 .vertex_buffer =
renderer.GetTransientsBuffer().Emplace(
38 count *
sizeof(VT),
alignof(VT),
39 [&generator](uint8_t*
buffer) {
40 auto vertices =
reinterpret_cast<VT*
>(
buffer);
41 generator.GenerateVertices([&vertices](
const Point& p) {
42 *vertices++ = {
44 };
45 });
47 generator.GetVertexCount());
48 }),
49 .vertex_count =
count,
51 },
52 .transform = entity.GetShaderTransform(pass),
53 };
54}
static const uint8_t buffer[]
#define FML_DCHECK(condition)
@ kNone
Does not use the index buffer.
◆ CoversArea()
bool impeller::Geometry::CoversArea |
( |
const Matrix & |
transform, |
|
|
const Rect & |
rect |
|
) |
| const |
|
virtual |
◆ GetCoverage()
virtual std::optional< Rect > impeller::Geometry::GetCoverage |
( |
const Matrix & |
transform | ) |
const |
|
pure virtual |
◆ GetPositionBuffer()
◆ GetResultMode()
◆ IsAxisAlignedRect()
bool impeller::Geometry::IsAxisAlignedRect |
( |
| ) |
const |
|
virtual |
◆ MakeCircle()
std::shared_ptr< Geometry > impeller::Geometry::MakeCircle |
( |
const Point & |
center, |
|
|
Scalar |
radius |
|
) |
| |
|
static |
Definition at line 104 of file geometry.cc.
105 {
106 return std::make_shared<CircleGeometry>(
center, radius);
107}
static SkScalar center(float pos0, float pos1)
◆ MakeCover()
std::shared_ptr< Geometry > impeller::Geometry::MakeCover |
( |
| ) |
|
|
static |
Definition at line 85 of file geometry.cc.
85 {
86 return std::make_shared<CoverGeometry>();
87}
◆ MakeFillPath()
std::shared_ptr< Geometry > impeller::Geometry::MakeFillPath |
( |
const Path & |
path, |
|
|
std::optional< Rect > |
inner_rect = std::nullopt |
|
) |
| |
|
static |
Definition at line 60 of file geometry.cc.
62 {
63 return std::make_shared<FillPathGeometry>(path, inner_rect);
64}
◆ MakeLine()
Definition at line 97 of file geometry.cc.
100 {
101 return std::make_shared<LineGeometry>(p0, p1,
width, cap);
102}
◆ MakeOval()
std::shared_ptr< Geometry > impeller::Geometry::MakeOval |
( |
const Rect & |
rect | ) |
|
|
static |
Definition at line 93 of file geometry.cc.
93 {
94 return std::make_shared<EllipseGeometry>(rect);
95}
◆ MakePointField()
std::shared_ptr< Geometry > impeller::Geometry::MakePointField |
( |
std::vector< Point > |
points, |
|
|
Scalar |
radius, |
|
|
bool |
round |
|
) |
| |
|
static |
Definition at line 66 of file geometry.cc.
68 {
69 return std::make_shared<PointFieldGeometry>(std::move(
points), radius,
round);
70}
static void round(SkPoint *p)
static const int points[]
◆ MakeRect()
std::shared_ptr< Geometry > impeller::Geometry::MakeRect |
( |
const Rect & |
rect | ) |
|
|
static |
Definition at line 89 of file geometry.cc.
89 {
90 return std::make_shared<RectGeometry>(rect);
91}
◆ MakeRoundRect()
std::shared_ptr< Geometry > impeller::Geometry::MakeRoundRect |
( |
const Rect & |
rect, |
|
|
const Size & |
radii |
|
) |
| |
|
static |
Definition at line 115 of file geometry.cc.
116 {
117 return std::make_shared<RoundRectGeometry>(rect, radii);
118}
◆ MakeStrokedCircle()
std::shared_ptr< Geometry > impeller::Geometry::MakeStrokedCircle |
( |
const Point & |
center, |
|
|
Scalar |
radius, |
|
|
Scalar |
stroke_width |
|
) |
| |
|
static |
Definition at line 109 of file geometry.cc.
111 {
113}
const Scalar stroke_width
◆ MakeStrokePath()
Definition at line 72 of file geometry.cc.
76 {
77
78 if (miter_limit < 0) {
79 miter_limit = 4.0;
80 }
81 return std::make_shared<StrokePathGeometry>(path,
stroke_width, miter_limit,
82 stroke_cap, stroke_join);
83}
The documentation for this class was generated from the following files: