 |
Flutter Impeller
|
|
Go to the documentation of this file.
89 size_t contour_index)
const;
103 using Applier = std::function<void(
size_t index,
const T& component)>;
141 void SetBounds(
Rect rect);
149 Path& AddContourComponent(
Point destination,
bool is_closed =
false);
155 void ComputeBounds();
157 void SetContourClosed(
bool is_closed);
159 void Shift(
Point shift);
161 bool UpdateLinearComponentAtIndex(
size_t index,
164 bool UpdateQuadraticComponentAtIndex(
size_t index,
169 bool UpdateContourComponentAtIndex(
size_t index,
172 struct ComponentIndexPair {
176 ComponentIndexPair() {}
179 : type(a_type), index(a_index) {}
184 std::vector<ComponentIndexPair> components_;
185 std::vector<LinearPathComponent> linears_;
186 std::vector<QuadraticPathComponent> quads_;
187 std::vector<CubicPathComponent> cubics_;
188 std::vector<ContourComponent> contours_;
190 std::optional<Rect> computed_bounds_;
bool GetQuadraticComponentAtIndex(size_t index, QuadraticPathComponent &quadratic) const
size_t start_index
Index that denotes the first point of this contour.
std::optional< Rect > GetBoundingBox() const
std::optional< std::pair< Point, Point > > GetMinMaxCoveragePoints() const
bool GetCubicComponentAtIndex(size_t index, CubicPathComponent &cubic) const
void EnumerateComponents(const Applier< LinearPathComponent > &linear_applier, const Applier< QuadraticPathComponent > &quad_applier, const Applier< CubicPathComponent > &cubic_applier, const Applier< ContourComponent > &contour_applier) const
Vector2 start_direction
The direction of the contour's start cap.
Paths are lightweight objects that describe a collection of linear, quadratic, or cubic segments....
std::optional< Rect > GetTransformedBoundingBox(const Matrix &transform) const
std::vector< Point > points
std::tuple< size_t, size_t > GetContourPointBounds(size_t contour_index) const
Vector2 end_direction
The direction of the contour's end cap.
bool GetContourComponentAtIndex(size_t index, ContourComponent &contour) const
std::function< void(size_t index, const T &component)> Applier
size_t GetComponentCount(std::optional< ComponentType > type={}) const
std::vector< PolylineContour > contours
bool GetLinearComponentAtIndex(size_t index, LinearPathComponent &linear) const
A 4x4 matrix using column-major storage.
FillType GetFillType() const
Polyline CreatePolyline(Scalar scale) const