Flutter Engine
The Flutter Engine
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#ifndef FLUTTER_IMPELLER_ENTITY_GEOMETRY_RECT_GEOMETRY_H_
6#define FLUTTER_IMPELLER_ENTITY_GEOMETRY_RECT_GEOMETRY_H_
7
9
10namespace impeller {
11
12class RectGeometry final : public Geometry {
13 public:
14 explicit RectGeometry(Rect rect);
15
16 ~RectGeometry() = default;
17
18 // |Geometry|
19 bool CoversArea(const Matrix& transform, const Rect& rect) const override;
20
21 // |Geometry|
22 bool IsAxisAlignedRect() const override;
23
24 // |Geometry|
26 const Entity& entity,
27 RenderPass& pass) const override;
28
29 // |Geometry|
30 std::optional<Rect> GetCoverage(const Matrix& transform) const override;
31
32 private:
33 Rect rect_;
34
35 RectGeometry(const RectGeometry&) = delete;
36
37 RectGeometry& operator=(const RectGeometry&) = delete;
38};
39
41
42} // namespace impeller
43
44#endif // FLUTTER_IMPELLER_ENTITY_GEOMETRY_RECT_GEOMETRY_H_
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...
std::optional< Rect > GetCoverage(const Matrix &transform) const override
GeometryResult GetPositionBuffer(const ContentContext &renderer, const Entity &entity, RenderPass &pass) const override
bool IsAxisAlignedRect() const override
Render passes encode render commands directed as one specific render target into an underlying comman...
Definition: render_pass.h:33
uint8_t value
sk_sp< SkBlender > blender SkRect rect
Definition: SkRecords.h:350
static SkColor4f transform(SkColor4f c, SkColorSpace *src, SkColorSpace *dst)
Definition: p3.cpp:47
A 4x4 matrix using column-major storage.
Definition: matrix.h:37