Flutter Engine
The Flutter Engine
|
#include <path.h>
Public Types | |
using | PointBufferPtr = std::unique_ptr< std::vector< Point > > |
using | ReclaimPointBufferCallback = std::function< void(PointBufferPtr)> |
Public Member Functions | |
Polyline (PointBufferPtr point_buffer, ReclaimPointBufferCallback reclaim) | |
Polyline (Polyline &&other) | |
~Polyline () | |
Point & | GetPoint (size_t index) const |
std::tuple< size_t, size_t > | GetContourPointBounds (size_t contour_index) const |
Public Attributes | |
PointBufferPtr | points |
std::vector< PolylineContour > | contours |
One or more contours represented as a series of points and indices in the point vector representing the start of a new contour.
Polylines are ephemeral and meant to be used by the tessellator. They do not allocate their own point vectors to allow for optimizations around allocation and reuse of arenas.
using impeller::Path::Polyline::PointBufferPtr = std::unique_ptr<std::vector<Point> > |
impeller::Path::Polyline::Polyline | ( | PointBufferPtr | point_buffer, |
ReclaimPointBufferCallback | reclaim | ||
) |
impeller::Path::Polyline::Polyline | ( | Path::Polyline && | other | ) |
impeller::Path::Polyline::~Polyline | ( | ) |
std::tuple< size_t, size_t > impeller::Path::Polyline::GetContourPointBounds | ( | size_t | contour_index | ) | const |
Convenience method to compute the start (inclusive) and end (exclusive) point of the given contour index.
The contour_index parameter is clamped to contours.size().
|
inline |
std::vector<PolylineContour> impeller::Path::Polyline::contours |
Contours are disconnected pieces of a polyline, such as when a MoveTo was issued on a PathBuilder.
PointBufferPtr impeller::Path::Polyline::points |