29#if JUCE_MSVC && JUCE_DEBUG
30 #pragma optimize ("t", on)
159 auto m1x = (
x1 +
x2) * 0.5f;
160 auto m1y = (
y1 +
y2) * 0.5f;
161 auto m2x = (
x2 + x3) * 0.5f;
162 auto m2y = (
y2 + y3) * 0.5f;
163 auto m3x = (m1x + m2x) * 0.5f;
164 auto m3y = (m1y + m2y) * 0.5f;
166 auto errorX = m3x -
x2;
167 auto errorY = m3y -
y2;
169 auto outsideTolerance = errorX * errorX + errorY * errorY >
toleranceSquared;
170 auto canBeSubdivided = (m3x != m1x && m3x != m2x)
171 || (m3y != m1y && m3y != m2y);
173 if (outsideTolerance && canBeSubdivided)
211 auto m1x = (
x1 +
x2) * 0.5f;
212 auto m1y = (
y1 +
y2) * 0.5f;
213 auto m2x = (x3 +
x2) * 0.5f;
214 auto m2y = (y3 +
y2) * 0.5f;
215 auto m3x = (x3 + x4) * 0.5f;
216 auto m3y = (y3 + y4) * 0.5f;
217 auto m4x = (m1x + m2x) * 0.5f;
218 auto m4y = (m1y + m2y) * 0.5f;
219 auto m5x = (m3x + m2x) * 0.5f;
220 auto m5y = (m3y + m2y) * 0.5f;
222 auto error1X = m4x -
x2;
223 auto error1Y = m4y -
y2;
224 auto error2X = m5x - x3;
225 auto error2Y = m5y - y3;
227 auto outsideTolerance = error1X * error1X + error1Y * error1Y >
toleranceSquared
229 auto canBeSubdivided = (m4x != m1x && m4x != m2x)
230 || (m4y != m1y && m4y != m2y)
231 || (m5x != m3x && m5x != m2x)
232 || (m5y != m3y && m5y != m2y);
234 if (outsideTolerance && canBeSubdivided)
291#if JUCE_MSVC && JUCE_DEBUG
292 #pragma optimize ("", on)
#define noexcept
Definition DistrhoDefines.h:72
CAdPlugDatabase::CRecord::RecordType type
Definition adplugdb.cpp:93
bool closesSubPath
Definition juce_PathIterator.h:83
bool next()
Definition juce_PathIterator.cpp:60
HeapBlock< float > stackBase
Definition juce_PathIterator.h:104
const float * source
Definition juce_PathIterator.h:99
float * stackPos
Definition juce_PathIterator.h:105
float subPathCloseY
Definition juce_PathIterator.h:101
~PathFlatteningIterator()
Definition juce_PathIterator.cpp:50
float y2
Definition juce_PathIterator.h:76
const AffineTransform transform
Definition juce_PathIterator.h:98
const Path & path
Definition juce_PathIterator.h:97
float x2
Definition juce_PathIterator.h:75
float y1
Definition juce_PathIterator.h:74
float subPathCloseX
Definition juce_PathIterator.h:101
PathFlatteningIterator(const Path &path, const AffineTransform &transform=AffineTransform(), float tolerance=Path::defaultToleranceForMeasurement)
Definition juce_PathIterator.cpp:34
size_t stackSize
Definition juce_PathIterator.h:106
float x1
Definition juce_PathIterator.h:73
int subPathIndex
Definition juce_PathIterator.h:90
const bool isIdentityTransform
Definition juce_PathIterator.h:102
const float toleranceSquared
Definition juce_PathIterator.h:100
bool isLastInSubpath() const noexcept
Definition juce_PathIterator.cpp:54
Definition juce_Path.h:65
static const float cubicMarker
Definition juce_Path.h:833
static const float closeSubPathMarker
Definition juce_Path.h:834
static const float quadMarker
Definition juce_Path.h:832
static const float lineMarker
Definition juce_Path.h:830
static const float moveMarker
Definition juce_Path.h:831
struct huft * t
Definition inflate.c:943
JSAMPIMAGE data
Definition jpeglib.h:945
Definition carla_juce.cpp:31
static bool isMarker(float value, float marker) noexcept
Definition juce_Path.cpp:70
RangedDirectoryIterator begin(const RangedDirectoryIterator &it)
Definition juce_RangedDirectoryIterator.h:179
#define false
Definition ordinals.h:83
#define const
Definition zconf.h:137