Flutter Engine
The Flutter Engine
fill_path_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_FILL_PATH_GEOMETRY_H_
6#define FLUTTER_IMPELLER_ENTITY_GEOMETRY_FILL_PATH_GEOMETRY_H_
7
8#include <optional>
9
12
13namespace impeller {
14
15/// @brief A geometry that is created from a filled path object.
16class FillPathGeometry final : public Geometry {
17 public:
18 explicit FillPathGeometry(const Path& path,
19 std::optional<Rect> inner_rect = std::nullopt);
20
21 ~FillPathGeometry() = default;
22
23 // |Geometry|
24 bool CoversArea(const Matrix& transform, const Rect& rect) const override;
25
26 private:
27 // |Geometry|
28 GeometryResult GetPositionBuffer(const ContentContext& renderer,
29 const Entity& entity,
30 RenderPass& pass) const override;
31
32 // |Geometry|
33 std::optional<Rect> GetCoverage(const Matrix& transform) const override;
34
35 // |Geometry|
36 GeometryResult::Mode GetResultMode() const override;
37
38 Path path_;
39 std::optional<Rect> inner_rect_;
40
41 FillPathGeometry(const FillPathGeometry&) = delete;
42
43 FillPathGeometry& operator=(const FillPathGeometry&) = delete;
44};
45
46} // namespace impeller
47
48#endif // FLUTTER_IMPELLER_ENTITY_GEOMETRY_FILL_PATH_GEOMETRY_H_
A geometry that is created from a filled path object.
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...
FillPathGeometry(const Path &path, std::optional< Rect > inner_rect=std::nullopt)
Paths are lightweight objects that describe a collection of linear, quadratic, or cubic segments....
Definition: path.h:52
Render passes encode render commands directed as one specific render target into an underlying comman...
Definition: render_pass.h:33
sk_sp< SkBlender > blender SkRect rect
Definition: SkRecords.h:350
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path
Definition: switches.h:57
static SkColor4f transform(SkColor4f c, SkColorSpace *src, SkColorSpace *dst)
Definition: p3.cpp:47
A 4x4 matrix using column-major storage.
Definition: matrix.h:37