Flutter Impeller
impeller::Path::ComponentIterator Class Reference

#include <path.h>

Public Member Functions

ComponentType type () const
 
const LinearPathComponentlinear () const
 
const QuadraticPathComponentquadratic () const
 
const ConicPathComponentconic () const
 
const CubicPathComponentcubic () const
 
const ContourComponentcontour () const
 
ComponentIteratoroperator++ ()
 
bool operator== (const ComponentIterator &other) const
 
bool operator!= (const ComponentIterator &other) const
 

Friends

class Path
 

Detailed Description

Definition at line 64 of file path.h.

Member Function Documentation

◆ conic()

const ConicPathComponent * impeller::Path::ComponentIterator::conic ( ) const

Definition at line 47 of file path.cc.

47  {
49  return nullptr;
50  }
51  const Point* points = &(path_.data_->points[storage_offset_]);
52  return reinterpret_cast<const ConicPathComponent*>(points);
53 }
#define CHECK_COMPONENT(type)
Definition: path.cc:26
TPoint< Scalar > Point
Definition: point.h:327

References CHECK_COMPONENT, and impeller::Path::kConic.

◆ contour()

const ContourComponent * impeller::Path::ComponentIterator::contour ( ) const

Definition at line 63 of file path.cc.

63  {
65  return nullptr;
66  }
67  const Point* points = &(path_.data_->points[storage_offset_]);
68  return reinterpret_cast<const ContourComponent*>(points);
69 }

References CHECK_COMPONENT, and impeller::Path::kContour.

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

◆ cubic()

const CubicPathComponent * impeller::Path::ComponentIterator::cubic ( ) const

Definition at line 55 of file path.cc.

55  {
57  return nullptr;
58  }
59  const Point* points = &(path_.data_->points[storage_offset_]);
60  return reinterpret_cast<const CubicPathComponent*>(points);
61 }

References CHECK_COMPONENT, and impeller::Path::kCubic.

◆ linear()

const LinearPathComponent * impeller::Path::ComponentIterator::linear ( ) const

Definition at line 31 of file path.cc.

31  {
33  return nullptr;
34  }
35  const Point* points = &(path_.data_->points[storage_offset_]);
36  return reinterpret_cast<const LinearPathComponent*>(points);
37 }

References CHECK_COMPONENT, and impeller::Path::kLinear.

◆ operator!=()

bool impeller::Path::ComponentIterator::operator!= ( const ComponentIterator other) const
inline

Definition at line 80 of file path.h.

80  {
81  return component_index_ != other.component_index_;
82  }

◆ operator++()

Path::ComponentIterator & impeller::Path::ComponentIterator::operator++ ( )

Definition at line 71 of file path.cc.

71  {
72  auto components = path_.data_->components;
73  if (component_index_ < components.size()) {
74  storage_offset_ += VerbToOffset(path_.data_->components[component_index_]);
75  component_index_++;
76  }
77  return *this;
78 }
static constexpr size_t VerbToOffset(Path::ComponentType verb)
Definition: path.h:95

References impeller::Path::VerbToOffset().

◆ operator==()

bool impeller::Path::ComponentIterator::operator== ( const ComponentIterator other) const
inline

Definition at line 77 of file path.h.

77  {
78  return component_index_ == other.component_index_;
79  }

◆ quadratic()

const QuadraticPathComponent * impeller::Path::ComponentIterator::quadratic ( ) const

Definition at line 39 of file path.cc.

39  {
41  return nullptr;
42  }
43  const Point* points = &(path_.data_->points[storage_offset_]);
44  return reinterpret_cast<const QuadraticPathComponent*>(points);
45 }

References CHECK_COMPONENT, and impeller::Path::kQuadratic.

◆ type()

Path::ComponentType impeller::Path::ComponentIterator::type ( ) const

Definition at line 22 of file path.cc.

22  {
23  return path_.data_->components[component_index_];
24 }

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

Friends And Related Function Documentation

◆ Path

friend class Path
friend

Definition at line 92 of file path.h.


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