JUCE  v6.1.6 (6.0.8-1114)
JUCE API
Looking for a senior C++ dev?
I'm looking for work. Hire me!
juce::Path::Iterator Class Reference

Iterates the lines and curves that a path contains. More...

#include <juce_Path.h>

Collaboration diagram for juce::Path::Iterator:

Public Types

enum  PathElementType {
  startNewSubPath,
  lineTo,
  quadraticTo,
  cubicTo,
  closePath
}
 

Public Member Functions

 Iterator (const Path &path) noexcept
 
 ~Iterator () noexcept
 
bool next () noexcept
 Moves onto the next element in the path. More...
 

Public Attributes

PathElementType elementType
 
float x1 = 0
 
float x2 = 0
 
float x3 = 0
 
float y1 = 0
 
float y2 = 0
 
float y3 = 0
 

Private Attributes

const floatindex
 
const Pathpath
 

Detailed Description

Iterates the lines and curves that a path contains.

See also
Path, PathFlatteningIterator

Member Enumeration Documentation

◆ PathElementType

Enumerator
startNewSubPath 

For this type, x1 and y1 will be set to indicate the first point in the subpath.


lineTo 

For this type, x1 and y1 indicate the end point of the line.


quadraticTo 

For this type, x1, y1, x2, y2 indicate the control point and endpoint of a quadratic curve.

cubicTo 

For this type, x1, y1, x2, y2, x3, y3 indicate the two control points and the endpoint of a cubic curve.

closePath 

Indicates that the sub-path is being closed.

None of the x or y values are valid in this case.

Constructor & Destructor Documentation

◆ Iterator()

juce::Path::Iterator::Iterator ( const Path path)
noexcept

◆ ~Iterator()

juce::Path::Iterator::~Iterator ( )
noexcept

Member Function Documentation

◆ next()

bool juce::Path::Iterator::next ( )
noexcept

Moves onto the next element in the path.

If this returns false, there are no more elements. If it returns true, the elementType variable will be set to the type of the current element, and some of the x and y variables will be filled in with values.

Member Data Documentation

◆ elementType

PathElementType juce::Path::Iterator::elementType

◆ index

const float* juce::Path::Iterator::index
private

◆ path

const Path& juce::Path::Iterator::path
private

◆ x1

float juce::Path::Iterator::x1 = 0

◆ x2

float juce::Path::Iterator::x2 = 0

◆ x3

float juce::Path::Iterator::x3 = 0

◆ y1

float juce::Path::Iterator::y1 = 0

◆ y2

float juce::Path::Iterator::y2 = 0

◆ y3

float juce::Path::Iterator::y3 = 0

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