Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
SkPath_PointIterator< N > Class Template Reference

#include <SkPathMakers.h>

Public Member Functions

 SkPath_PointIterator (SkPathDirection dir, unsigned startIndex)
 
const SkPointcurrent () const
 
const SkPointnext ()
 

Protected Attributes

SkPoint fPts [N]
 

Detailed Description

template<unsigned N>
class SkPath_PointIterator< N >

Definition at line 15 of file SkPathMakers.h.

Constructor & Destructor Documentation

◆ SkPath_PointIterator()

template<unsigned N>
SkPath_PointIterator< N >::SkPath_PointIterator ( SkPathDirection  dir,
unsigned  startIndex 
)
inline

Definition at line 17 of file SkPathMakers.h.

18 : fCurrent(startIndex % N)
19 , fAdvance(dir == SkPathDirection::kCW ? 1 : N - 1) { }
#define N
Definition beziers.cpp:19

Member Function Documentation

◆ current()

template<unsigned N>
const SkPoint & SkPath_PointIterator< N >::current ( ) const
inline

Definition at line 21 of file SkPathMakers.h.

21 {
22 SkASSERT(fCurrent < N);
23 return fPts[fCurrent];
24 }
#define SkASSERT(cond)
Definition SkAssert.h:116

◆ next()

template<unsigned N>
const SkPoint & SkPath_PointIterator< N >::next ( )
inline

Definition at line 26 of file SkPathMakers.h.

26 {
27 fCurrent = (fCurrent + fAdvance) % N;
28 return this->current();
29 }
const SkPoint & current() const

Member Data Documentation

◆ fPts

template<unsigned N>
SkPoint SkPath_PointIterator< N >::fPts[N]
protected

Definition at line 32 of file SkPathMakers.h.


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