diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2011-03-16 16:25:47 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2011-03-16 16:25:47 (GMT) |
commit | 580e3d9968e12fb38348af503ef9ede50691c24c (patch) | |
tree | 2ae55db9989bd8147de9d25071cecbd279b847d7 /src/gui/painting/qpainterpath.cpp | |
parent | e318b0276c3d4a0db8660b4fa6d68f1784aee522 (diff) | |
parent | b8ded0df9c85558b93ee5ec5abd5774c87c4deed (diff) | |
download | Qt-580e3d9968e12fb38348af503ef9ede50691c24c.zip Qt-580e3d9968e12fb38348af503ef9ede50691c24c.tar.gz Qt-580e3d9968e12fb38348af503ef9ede50691c24c.tar.bz2 |
Merge remote-tracking branch 'origin/4.7' into HEAD
Conflicts:
configure
mkspecs/symbian-gcce/qmake.conf
qmake/generators/metamakefile.cpp
qmake/generators/win32/mingw_make.cpp
src/corelib/global/global.pri
src/corelib/global/qglobal.h
src/opengl/qgl.cpp
src/opengl/qwindowsurface_gl.cpp
src/plugins/platforms/wayland/qwaylandbuffer.h
tests/auto/qnetworkreply/tst_qnetworkreply.cpp
tools/designer/src/components/formeditor/qdesigner_resource.cpp
Diffstat (limited to 'src/gui/painting/qpainterpath.cpp')
-rw-r--r-- | src/gui/painting/qpainterpath.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/painting/qpainterpath.cpp b/src/gui/painting/qpainterpath.cpp index 8bff021..49f1a5f 100644 --- a/src/gui/painting/qpainterpath.cpp +++ b/src/gui/painting/qpainterpath.cpp @@ -1724,7 +1724,7 @@ static void qt_painterpath_isect_line(const QPointF &p1, } static void qt_painterpath_isect_curve(const QBezier &bezier, const QPointF &pt, - int *winding) + int *winding, int depth = 0) { qreal y = pt.y(); qreal x = pt.x(); @@ -1739,7 +1739,7 @@ static void qt_painterpath_isect_curve(const QBezier &bezier, const QPointF &pt, // hit lower limit... This is a rough threshold, but its a // tradeoff between speed and precision. const qreal lower_bound = qreal(.001); - if (bounds.width() < lower_bound && bounds.height() < lower_bound) { + if (depth == 32 || (bounds.width() < lower_bound && bounds.height() < lower_bound)) { // We make the assumption here that the curve starts to // approximate a line after while (i.e. that it doesn't // change direction drastically during its slope) @@ -1752,8 +1752,8 @@ static void qt_painterpath_isect_curve(const QBezier &bezier, const QPointF &pt, // split curve and try again... QBezier first_half, second_half; bezier.split(&first_half, &second_half); - qt_painterpath_isect_curve(first_half, pt, winding); - qt_painterpath_isect_curve(second_half, pt, winding); + qt_painterpath_isect_curve(first_half, pt, winding, depth + 1); + qt_painterpath_isect_curve(second_half, pt, winding, depth + 1); } } |