Flutter Impeller
path_builder.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_TOOLKIT_INTEROP_PATH_BUILDER_H_
6 #define FLUTTER_IMPELLER_TOOLKIT_INTEROP_PATH_BUILDER_H_
7 
8 #include "flutter/third_party/skia/include/core/SkPath.h"
14 
15 namespace impeller::interop {
16 
17 class PathBuilder final
18  : public Object<PathBuilder,
19  IMPELLER_INTERNAL_HANDLE_NAME(ImpellerPathBuilder)> {
20  public:
21  PathBuilder();
22 
23  ~PathBuilder();
24 
25  PathBuilder(const PathBuilder&) = delete;
26 
27  PathBuilder& operator=(const PathBuilder&) = delete;
28 
29  void MoveTo(const Point& point);
30 
31  void LineTo(const Point& location);
32 
33  void QuadraticCurveTo(const Point& control_point, const Point& end_point);
34 
35  void CubicCurveTo(const Point& control_point_1,
36  const Point& control_point_2,
37  const Point& end_point);
38 
39  void AddRect(const Rect& rect);
40 
41  void AddArc(const Rect& oval_bounds, Degrees start_angle, Degrees end_angle);
42 
43  void AddOval(const Rect& oval_bounds);
44 
45  void AddRoundedRect(const Rect& rect,
47 
48  void Close();
49 
51 
53 
54  private:
55  SkPath builder_;
56 };
57 
58 } // namespace impeller::interop
59 
60 #endif // FLUTTER_IMPELLER_TOOLKIT_INTEROP_PATH_BUILDER_H_
impeller.h
impeller::interop::Object
Definition: object.h:56
impeller::interop::PathBuilder::MoveTo
void MoveTo(const Point &point)
Definition: path_builder.cc:15
impeller::interop::ScopedObject
Definition: object.h:67
impeller::interop::PathBuilder
Definition: path_builder.h:17
impeller::interop::PathBuilder::Close
void Close()
Definition: path_builder.cc:60
path_builder.h
impeller::interop::PathBuilder::~PathBuilder
~PathBuilder()
impeller::interop
Definition: color_filter.cc:7
impeller::interop::PathBuilder::AddRoundedRect
void AddRoundedRect(const Rect &rect, const impeller::PathBuilder::RoundingRadii &radii)
Definition: path_builder.cc:54
impeller::PathBuilder::RoundingRadii
Definition: path_builder.h:105
path.h
impeller::interop::PathBuilder::TakePath
ScopedObject< Path > TakePath(FillType fill)
Definition: path_builder.cc:64
impeller::interop::PathBuilder::AddRect
void AddRect(const Rect &rect)
Definition: path_builder.cc:37
impeller::interop::PathBuilder::operator=
PathBuilder & operator=(const PathBuilder &)=delete
impeller::interop::PathBuilder::AddArc
void AddArc(const Rect &oval_bounds, Degrees start_angle, Degrees end_angle)
Definition: path_builder.cc:41
impeller::FillType
FillType
Definition: path.h:30
impeller::interop::PathBuilder::LineTo
void LineTo(const Point &location)
Definition: path_builder.cc:19
impeller::interop::PathBuilder::CubicCurveTo
void CubicCurveTo(const Point &control_point_1, const Point &control_point_2, const Point &end_point)
Definition: path_builder.cc:28
impeller::interop::PathBuilder::PathBuilder
PathBuilder()
impeller::interop::PathBuilder::CopyPath
ScopedObject< Path > CopyPath(FillType fill)
Definition: path_builder.cc:69
impeller::interop::PathBuilder::AddOval
void AddOval(const Rect &oval_bounds)
Definition: path_builder.cc:50
impeller::interop::PathBuilder::QuadraticCurveTo
void QuadraticCurveTo(const Point &control_point, const Point &end_point)
Definition: path_builder.cc:23
impeller::TPoint< Scalar >
impeller::Degrees
Definition: scalar.h:51
path.h
impeller::TRect< Scalar >
object.h