openshot-audio  0.1.7
juce_PathIterator.h
Go to the documentation of this file.
1 /*
2  ==============================================================================
3 
4  This file is part of the JUCE library.
5  Copyright (c) 2015 - ROLI Ltd.
6 
7  Permission is granted to use this software under the terms of either:
8  a) the GPL v2 (or any later version)
9  b) the Affero GPL v3
10 
11  Details of these licenses can be found at: www.gnu.org/licenses
12 
13  JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
14  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
15  A PARTICULAR PURPOSE. See the GNU General Public License for more details.
16 
17  ------------------------------------------------------------------------------
18 
19  To release a closed-source product which uses JUCE, commercial licenses are
20  available: visit www.juce.com for more information.
21 
22  ==============================================================================
23 */
24 
25 #ifndef JUCE_PATHITERATOR_H_INCLUDED
26 #define JUCE_PATHITERATOR_H_INCLUDED
27 
28 
29 //==============================================================================
40 {
41 public:
42  //==============================================================================
54  PathFlatteningIterator (const Path& path,
55  const AffineTransform& transform = AffineTransform::identity,
56  float tolerance = defaultTolerance);
57 
60 
61  //==============================================================================
69  bool next();
70 
71  float x1;
72  float y1;
73  float x2;
74  float y2;
82 
89 
91  bool isLastInSubpath() const noexcept;
92 
94  static const float defaultTolerance;
95 
96 private:
97  //==============================================================================
98  const Path& path;
99  const AffineTransform transform;
100  float* points;
101  const float toleranceSquared;
102  float subPathCloseX, subPathCloseY;
103  const bool isIdentityTransform;
104 
105  HeapBlock <float> stackBase;
106  float* stackPos;
107  size_t index, stackSize;
108 
110 };
111 
112 
113 #endif // JUCE_PATHITERATOR_H_INCLUDED
Definition: juce_PathIterator.h:39
float x2
Definition: juce_PathIterator.h:73
#define noexcept
Definition: juce_CompilerSupport.h:141
bool closesSubPath
Definition: juce_PathIterator.h:81
float y1
Definition: juce_PathIterator.h:72
#define JUCE_API
Definition: juce_StandardHeader.h:139
static const AffineTransform identity
Definition: juce_AffineTransform.h:78
Definition: juce_Path.h:62
float x1
Definition: juce_PathIterator.h:71
#define JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(className)
Definition: juce_PlatformDefs.h:198
Definition: juce_HeapBlock.h:90
Definition: juce_AffineTransform.h:40
float y2
Definition: juce_PathIterator.h:74
int subPathIndex
Definition: juce_PathIterator.h:88