Flutter Engine Uber Docs
Docs for the entire Flutter Engine repo.
 
Loading...
Searching...
No Matches
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
14namespace 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 const Geometry* GetGeometry() const override;
27
28 private:
29 explicit CircleContents(std::unique_ptr<CircleGeometry> geometry,
30 Color color,
31 bool stroked,
32 Scalar aa_padding);
33
34 std::unique_ptr<CircleGeometry> geometry_;
35 Color color_;
36 bool stroked_;
37 Scalar aa_padding_;
38};
39} // namespace impeller
40
41#endif // FLUTTER_IMPELLER_ENTITY_CONTENTS_CIRCLE_CONTENTS_H_
const Geometry * GetGeometry() const override
Get the geometry that this contents will use to render.
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
float Scalar
Definition scalar.h:19