| Flutter Impeller |

circle_contents.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_CONTENTS_CIRCLE_CONTENTS_H_
6 #define FLUTTER_IMPELLER_ENTITY_CONTENTS_CIRCLE_CONTENTS_H_
7
8 #include <memory>
9
10 #include "flutter/impeller/entity/contents/color_source_contents.h"
11 #include "flutter/impeller/entity/contents/contents.h"
12 #include "impeller/entity/geometry/circle_geometry.h"
13
14 namespace impeller {
15 class CircleContents : public ColorSourceContents {
16 public:
17 static std::unique_ptr<CircleContents>
18 Make(std::unique_ptr<CircleGeometry> geometry, Color color, bool stroked);
19
20 bool Render(const ContentContext& renderer,
21 const Entity& entity,
22 RenderPass& pass) const override;
23
24 std::optional<Rect> GetCoverage(const Entity& entity) const override;
25
26 private:
27 explicit CircleContents(std::unique_ptr<CircleGeometry> geometry,
28 Color color,
29 bool stroked);
30
31 std::unique_ptr<CircleGeometry> geometry_;
32 Color color_;
33 bool stroked_;
34 };
35 } // namespace impeller
36
37 #endif // FLUTTER_IMPELLER_ENTITY_CONTENTS_CIRCLE_CONTENTS_H_
circle_geometry.h
impeller::CircleContents
Definition: circle_contents.h:15
impeller::CircleContents::GetCoverage
std::optional< Rect > GetCoverage(const Entity &entity) const override
Get the area of the render pass that will be affected when this contents is rendered.
Definition: circle_contents.cc:88
impeller::CircleContents::Make
static std::unique_ptr< CircleContents > Make(std::unique_ptr< CircleGeometry > geometry, Color color, bool stroked)
Definition: circle_contents.cc:36
impeller::CircleContents::Render
bool Render(const ContentContext &renderer, const Entity &entity, RenderPass &pass) const override
Definition: circle_contents.cc:49
impeller::ColorSourceContents
Definition: color_source_contents.h:38
impeller::ContentContext
Definition: content_context.h:122
impeller::Entity
Definition: entity.h:26
impeller::RenderPass
Render passes encode render commands directed as one specific render target into an underlying comman...
Definition: render_pass.h:30
color_source_contents.h
contents.h
impeller
Definition: allocation.cc:12
impeller::Color
Definition: color.h:124