Flutter Engine
 
Loading...
Searching...
No Matches
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
9
10namespace 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.
16class PointFieldGeometry final : public Geometry {
17 public:
19 size_t point_count,
20 Scalar radius,
21 bool round);
22
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
40
41 PointFieldGeometry& operator=(const PointFieldGeometry&) = delete;
42};
43
44} // namespace impeller
45
46#endif // FLUTTER_IMPELLER_ENTITY_GEOMETRY_POINT_FIELD_GEOMETRY_H_
A geometry class specialized for Canvas::DrawPoints.
std::optional< Rect > GetCoverage(const Matrix &transform) const override
Render passes encode render commands directed as one specific render target into an underlying comman...
Definition render_pass.h:30
float Scalar
Definition scalar.h:19
A 4x4 matrix using column-major storage.
Definition matrix.h:37
std::vector< Point > points