 |
Flutter Impeller
|
|
Go to the documentation of this file.
5 #ifndef FLUTTER_IMPELLER_GEOMETRY_PATH_H_
6 #define FLUTTER_IMPELLER_GEOMETRY_PATH_H_
138 size_t contour_index)
const;
176 std::make_unique<std::vector<Point>>(),
180 size_t storage_offset,
182 size_t component_index,
183 std::vector<PolylineContour::Component>& poly_components)
const;
211 Data(Data&& other) =
default;
213 Data(
const Data& other) =
default;
219 std::optional<Rect> bounds;
220 std::vector<Point> points;
221 std::vector<ComponentType> components;
226 std::shared_ptr<const Data> data_;
229 static_assert(
sizeof(Path) ==
sizeof(std::shared_ptr<struct Anonymous>));
233 #endif // FLUTTER_IMPELLER_GEOMETRY_PATH_H_
const Path::Polyline & polyline
bool GetQuadraticComponentAtIndex(size_t index, QuadraticPathComponent &quadratic) const
size_t start_index
Index that denotes the first point of this contour.
std::shared_ptr< const fml::Mapping > data
std::vector< Component > components
std::optional< Rect > GetBoundingBox() const
Polyline(PointBufferPtr point_buffer, ReclaimPointBufferCallback reclaim)
void WritePolyline(Scalar scale, VertexWriter &writer) const
bool GetCubicComponentAtIndex(size_t index, CubicPathComponent &cubic) const
std::function< void(PointBufferPtr)> ReclaimPointBufferCallback
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....
Point & GetPoint(size_t index) const
std::optional< Rect > GetTransformedBoundingBox(const Matrix &transform) const
void EndContour(size_t storage_offset, Polyline &polyline, size_t component_index, std::vector< PolylineContour::Component > &poly_components) const
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
An interface for generating a multi contour polyline as a triangle strip.
size_t GetComponentCount(std::optional< ComponentType > type={}) const
std::vector< PolylineContour > contours
static constexpr size_t VerbToOffset(Path::ComponentType verb)
std::unique_ptr< std::vector< Point > > PointBufferPtr
size_t component_start_index
Polyline CreatePolyline(Scalar scale, Polyline::PointBufferPtr point_buffer=std::make_unique< std::vector< Point >>(), Polyline::ReclaimPointBufferCallback reclaim=nullptr) const
bool GetLinearComponentAtIndex(size_t index, LinearPathComponent &linear) const
A 4x4 matrix using column-major storage.
FillType GetFillType() const