| Flutter Impeller |

Public Member Functions | List of all members
impeller::interop::PathBuilder Class Referencefinal

`#include <path_builder.h>`

Inheritance diagram for impeller::interop::PathBuilder:

## Public Member Functions
| PathBuilder ()
| ~PathBuilder ()
| PathBuilder (const PathBuilder &)=delete
PathBuilder & | operator= (const PathBuilder &)=delete
void | MoveTo (const Point &point)
void | LineTo (const Point &location)
void | QuadraticCurveTo (const Point &control_point, const Point &end_point)
void | CubicCurveTo (const Point &control_point_1, const Point &control_point_2, const Point &end_point)
void | AddRect (const Rect &rect)
void | AddArc (const Rect &oval_bounds, Degrees start_angle, Degrees end_angle)
void | AddOval (const Rect &oval_bounds)
void | AddRoundedRect (const Rect &rect, const impeller::PathBuilder::RoundingRadii &radii)
void | Close ()
ScopedObject< Path > | TakePath (FillType fill)
ScopedObject< Path > | CopyPath (FillType fill)
Public Member Functions inherited from impeller::interop::ObjectBase
| ObjectBase ()=default
virtual | ~ObjectBase ()=default
| ObjectBase (const ObjectBase &)=delete
| ObjectBase (ObjectBase &&)=delete
ObjectBase & | operator= (const ObjectBase &)=delete
ObjectBase & | operator= (ObjectBase &&)=delete
void | Retain ()
void | Release ()
uint64_t | GetRefCountForTests () const

## Additional Inherited Members
Public Types inherited from impeller::interop::Object< PathBuilder, IMPELLER_INTERNAL_HANDLE_NAME(ImpellerPathBuilder)>
using | InteropClass = PathBuilder
using | InteropCSibling = IMPELLER_INTERNAL_HANDLE_NAME(ImpellerPathBuilder)
Static Public Member Functions inherited from impeller::interop::ObjectBase
static void | SafeRetain (void *ptr)
static void | SafeRelease (void *ptr)

## Detailed Description

Definition at line 17 of file path_builder.h.

## Constructor & Destructor Documentation

## ◆ PathBuilder() [1/2]

impeller::interop::PathBuilder::PathBuilder | ( |  | ) |
| default

## ◆ ~PathBuilder()

impeller::interop::PathBuilder::~PathBuilder | ( |  | ) |
| default

## ◆ PathBuilder() [2/2]

impeller::interop::PathBuilder::PathBuilder | ( | const PathBuilder & |  | ) |
| delete

## Member Function Documentation

## ◆ AddArc()

void impeller::interop::PathBuilder::AddArc | ( | const Rect & | oval_bounds,
|  | Degrees | start_angle,
|  | Degrees | end_angle
| ) |  |

Definition at line 41 of file path_builder.cc.

43 {
44 builder_.addArc(ToSkiaType(oval_bounds), //
45 start_angle.degrees, //
46 end_angle.degrees - start_angle.degrees // sweep
47 );
48 }

References impeller::Degrees::degrees, and impeller::interop::ToSkiaType().

## ◆ AddOval()

void impeller::interop::PathBuilder::AddOval | ( | const Rect & | oval_bounds | ) |

Definition at line 50 of file path_builder.cc.

50 {
51 builder_.addOval(ToSkiaType(oval_bounds));
52 }

References impeller::interop::ToSkiaType().

## ◆ AddRect()

void impeller::interop::PathBuilder::AddRect | ( | const Rect & | rect | ) |

Definition at line 37 of file path_builder.cc.

37 {
38 builder_.addRect(ToSkiaType(rect));
39 }

References impeller::interop::ToSkiaType().

## ◆ AddRoundedRect()

void impeller::interop::PathBuilder::AddRoundedRect | ( | const Rect & | rect,
|  | const impeller::PathBuilder::RoundingRadii & | radii
| ) |  |

Definition at line 54 of file path_builder.cc.

56 {
57 builder_.addRRect(ToSkiaType(rect, radii));
58 }

References impeller::interop::ToSkiaType().

## ◆ Close()

void impeller::interop::PathBuilder::Close | ( |  | ) |

Definition at line 60 of file path_builder.cc.

60 {
61 builder_.close();
62 }

## ◆ CopyPath()

ScopedObject< Path > impeller::interop::PathBuilder::CopyPath | ( | FillType | fill | ) |

Definition at line 69 of file path_builder.cc.

69 {
70 builder_.setFillType(ToSkiaType(fill));
71 return Create<Path>(builder_);
72 }

References impeller::interop::ToSkiaType().

## ◆ CubicCurveTo()

void impeller::interop::PathBuilder::CubicCurveTo | ( | const Point & | control_point_1,
|  | const Point & | control_point_2,
|  | const Point & | end_point
| ) |  |

Definition at line 28 of file path_builder.cc.

30 {
31 builder_.cubicTo(ToSkiaType(control_point_1), //
32 ToSkiaType(control_point_2), //
33 ToSkiaType(end_point) //
34 );
35 }

References impeller::interop::ToSkiaType().

## ◆ LineTo()

void impeller::interop::PathBuilder::LineTo | ( | const Point & | location | ) |

Definition at line 19 of file path_builder.cc.

19 {
20 builder_.lineTo(ToSkiaType(location));
21 }

References impeller::interop::ToSkiaType().

## ◆ MoveTo()

void impeller::interop::PathBuilder::MoveTo | ( | const Point & | point | ) |

Definition at line 15 of file path_builder.cc.

15 {
16 builder_.moveTo(ToSkiaType(point));
17 }

References impeller::interop::ToSkiaType().

## ◆ operator=()

PathBuilder& impeller::interop::PathBuilder::operator= | ( | const PathBuilder & |  | ) |
| delete

## ◆ QuadraticCurveTo()

void impeller::interop::PathBuilder::QuadraticCurveTo | ( | const Point & | control_point,
|  | const Point & | end_point
| ) |  |

Definition at line 23 of file path_builder.cc.

24 {
25 builder_.quadTo(ToSkiaType(control_point), ToSkiaType(end_point));
26 }

References impeller::interop::ToSkiaType().

## ◆ TakePath()

ScopedObject< Path > impeller::interop::PathBuilder::TakePath | ( | FillType | fill | ) |

Definition at line 64 of file path_builder.cc.

64 {
65 builder_.setFillType(ToSkiaType(fill));
66 return Create<Path>(std::move(builder_));
67 }

References impeller::interop::ToSkiaType().

The documentation for this class was generated from the following files:

- impeller/toolkit/interop/path_builder.h
- impeller/toolkit/interop/path_builder.cc

impeller::interop::ToSkiaType
constexpr std::optional< SkRect > ToSkiaType(const ImpellerRect *rect)
Definition: formats.h:26