| Flutter Impeller |

point_field_geometry.h
Go to the documentation of this file.
1 // Copyright 2013 The Flutter Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef FLUTTER_IMPELLER_ENTITY_GEOMETRY_POINT_FIELD_GEOMETRY_H_
6 #define FLUTTER_IMPELLER_ENTITY_GEOMETRY_POINT_FIELD_GEOMETRY_H_
7
8 #include "impeller/entity/geometry/geometry.h"
9
10 namespace impeller {
11
12 /// @brief A geometry class specialized for Canvas::DrawPoints.
13 ///
14 /// Does not hold ownership of the allocated point data, which is expected to be
15 /// maintained via the display list structure.
16 class PointFieldGeometry final : public Geometry {
17 public:
18 PointFieldGeometry(const Point* points,
19 size_t point_count,
20 Scalar radius,
21 bool round);
22
23 ~PointFieldGeometry() override;
24
25 // |Geometry|
26 std::optional<Rect> GetCoverage(const Matrix& transform) const override;
27
28 private:
29 // |Geometry|
30 GeometryResult GetPositionBuffer(const ContentContext& renderer,
31 const Entity& entity,
32 RenderPass& pass) const override;
33
34 size_t point_count_;
35 Scalar radius_;
36 bool round_;
37 const Point* points_;
38
39 PointFieldGeometry(const PointFieldGeometry&) = delete;
40
41 PointFieldGeometry& operator=(const PointFieldGeometry&) = delete;
42 };
43
44 } // namespace impeller
45
46 #endif // FLUTTER_IMPELLER_ENTITY_GEOMETRY_POINT_FIELD_GEOMETRY_H_
impeller::ContentContext
Definition: content_context.h:138
impeller::Entity
Definition: entity.h:26
impeller::Geometry
Definition: geometry.h:50
impeller::PointFieldGeometry
A geometry class specialized for Canvas::DrawPoints.
Definition: point_field_geometry.h:16
impeller::PointFieldGeometry::GetCoverage
std::optional< Rect > GetCoverage(const Matrix &transform) const override
Definition: point_field_geometry.cc:134
impeller::PointFieldGeometry::~PointFieldGeometry
~PointFieldGeometry() override
impeller::PointFieldGeometry::PointFieldGeometry
PointFieldGeometry(const Point *points, size_t point_count, Scalar radius, bool round)
Definition: point_field_geometry.cc:15
impeller::RenderPass
Render passes encode render commands directed as one specific render target into an underlying comman...
Definition: render_pass.h:30
transform
Matrix transform
Definition: gaussian_blur_filter_contents.cc:214
geometry.h
impeller
Definition: allocation.cc:12
impeller::Scalar
float Scalar
Definition: scalar.h:19
impeller::GeometryResult
Definition: geometry.h:21
impeller::Matrix
A 4x4 matrix using column-major storage.
Definition: matrix.h:37
impeller::TPoint< Scalar >
points
std::vector< Point > points
Definition: tessellator_libtess.cc:76