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 
13 
14 namespace impeller {
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_
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.
static std::unique_ptr< CircleContents > Make(std::unique_ptr< CircleGeometry > geometry, Color color, bool stroked)
bool Render(const ContentContext &renderer, const Entity &entity, RenderPass &pass) const override
Render passes encode render commands directed as one specific render target into an underlying comman...
Definition: render_pass.h:30