Flutter Impeller
impeller::PathTessellator Class Reference

#include <path_tessellator.h>

Classes

struct  Conic
 
struct  Cubic
 
struct  Quad
 
class  SegmentReceiver
 An interface for receiving pruned path segments. More...
 
class  VertexWriter
 An interface for generating a multi contour polyline as a triangle strip. More...
 

Static Public Member Functions

static void PathToFilledSegments (const PathSource &source, SegmentReceiver &receiver)
 
static void PathToStrokedSegments (const PathSource &source, SegmentReceiver &receiver)
 
static std::pair< size_t, size_t > CountFillStorage (const PathSource &source, Scalar scale)
 
static void PathToFilledVertices (const PathSource &source, VertexWriter &writer, Scalar scale)
 
static void PathToTransformedFilledVertices (const PathSource &source, VertexWriter &writer, const Matrix &matrix)
 

Detailed Description

Definition at line 17 of file path_tessellator.h.

Member Function Documentation

◆ CountFillStorage()

std::pair< size_t, size_t > impeller::PathTessellator::CountFillStorage ( const PathSource source,
Scalar  scale 
)
static

Definition at line 298 of file path_tessellator.cc.

300  {
301  StorageCounter counter(scale);
302  PathPruner pruner(counter, false);
303  source.Dispatch(pruner);
304  pruner.PathEnd();
305  return {counter.GetPointCount(), counter.GetContourCount()};
306 }

References impeller::PathSource::Dispatch().

Referenced by impeller::ConvexTessellatorImpl< IndexT >::TessellateConvex(), and impeller::testing::TEST().

◆ PathToFilledSegments()

void impeller::PathTessellator::PathToFilledSegments ( const PathSource source,
SegmentReceiver receiver 
)
static

Definition at line 284 of file path_tessellator.cc.

285  {
286  PathPruner pruner(receiver, false);
287  source.Dispatch(pruner);
288  pruner.PathEnd();
289 }

References impeller::PathSource::Dispatch().

Referenced by impeller::testing::TEST().

◆ PathToFilledVertices()

void impeller::PathTessellator::PathToFilledVertices ( const PathSource source,
VertexWriter writer,
Scalar  scale 
)
static

Definition at line 308 of file path_tessellator.cc.

310  {
311  PathFillWriter path_writer(writer, scale);
312  PathPruner pruner(path_writer, false);
313  source.Dispatch(pruner);
314  pruner.PathEnd();
315 }

References impeller::PathSource::Dispatch().

Referenced by impeller::TessellatorLibtess::Tessellate(), impeller::ConvexTessellatorImpl< IndexT >::TessellateConvex(), and impeller::testing::TEST().

◆ PathToStrokedSegments()

void impeller::PathTessellator::PathToStrokedSegments ( const PathSource source,
SegmentReceiver receiver 
)
static

Definition at line 291 of file path_tessellator.cc.

292  {
293  PathPruner pruner(receiver, true);
294  source.Dispatch(pruner);
295  pruner.PathEnd();
296 }

References impeller::PathSource::Dispatch().

Referenced by impeller::StrokePathSourceGeometry::Dispatch().

◆ PathToTransformedFilledVertices()

void impeller::PathTessellator::PathToTransformedFilledVertices ( const PathSource source,
VertexWriter writer,
const Matrix matrix 
)
static

Definition at line 317 of file path_tessellator.cc.

319  {
320  PathFillWriter path_writer(writer, matrix.GetMaxBasisLengthXY());
321  PathPruner pruner(path_writer, false);
322  PathTransformer transformer(pruner, matrix);
323  source.Dispatch(transformer);
324  pruner.PathEnd();
325 }

References impeller::PathSource::Dispatch(), and impeller::Matrix::GetMaxBasisLengthXY().


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