| Flutter Impeller |

rect_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 #pragma once
6
7 #include "impeller/entity/geometry/geometry.h"
8
9 namespace impeller {
10
11 class RectGeometry : public Geometry {
12 public:
13 explicit RectGeometry(Rect rect);
14
15 ~RectGeometry();
16
17 // |Geometry|
18 bool CoversArea(const Matrix& transform, const Rect& rect) const override;
19
20 private:
21 // |Geometry|
22 GeometryResult GetPositionBuffer(const ContentContext& renderer,
23 const Entity& entity,
24 RenderPass& pass) override;
25
26 // |Geometry|
27 GeometryVertexType GetVertexType() const override;
28
29 // |Geometry|
30 std::optional<Rect> GetCoverage(const Matrix& transform) const override;
31
32 // |Geometry|
33 GeometryResult GetPositionUVBuffer(Rect texture_coverage,
34 Matrix effect_transform,
35 const ContentContext& renderer,
36 const Entity& entity,
37 RenderPass& pass) override;
38
39 Rect rect_;
40
41 FML_DISALLOW_COPY_AND_ASSIGN(RectGeometry);
42 };
43
44 } // namespace impeller
impeller::GeometryVertexType
GeometryVertexType
Definition: geometry.h:25
impeller::Entity
Definition: entity.h:21
impeller::RectGeometry::RectGeometry
RectGeometry(Rect rect)
Definition: rect_geometry.cc:9
impeller::RectGeometry::~RectGeometry
~RectGeometry()
geometry.h
impeller::RectGeometry
Definition: rect_geometry.h:11
impeller::GeometryResult
Definition: geometry.h:18
impeller::RenderPass
Render passes encode render commands directed as one specific render target into an underlying comman...
Definition: render_pass.h:27
impeller::Geometry
Definition: geometry.h:54
impeller::RectGeometry::CoversArea
bool CoversArea(const Matrix &transform, const Rect &rect) const override
Determines if this geometry, transformed by the given transform, will completely cover all surface ar...
Definition: rect_geometry.cc:50
impeller
Definition: aiks_context.cc:10
impeller::ContentContext
Definition: content_context.h:344
impeller::TRect< Scalar >
impeller::Matrix
A 4x4 matrix using column-major storage.
Definition: matrix.h:36