summaryrefslogtreecommitdiff
path: root/src/particles
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2014-06-13 23:10:03 +0200
committerSimon Hausmann <simon.hausmann@digia.com>2014-06-13 23:10:03 +0200
commit9932617582470d717c97f8161a65133293c185c5 (patch)
tree1df48d67c6e5ca4aa8b7810fc9e717083b4199e3 /src/particles
parent7fde8a8d20da7fa00d974286fa903b3fee76d466 (diff)
parent17ee404f2678684674b9c5c0c523602953146e37 (diff)
downloadqtdeclarative-9932617582470d717c97f8161a65133293c185c5.tar.gz
qtdeclarative-9932617582470d717c97f8161a65133293c185c5.tar.bz2
qtdeclarative-9932617582470d717c97f8161a65133293c185c5.zip
Merge remote-tracking branch 'origin/5.3' into dev
Conflicts: src/quickwidgets/qquickwidget.cpp Change-Id: Id4b080aea713df68608847bb82570231e37ce536
Diffstat (limited to 'src/particles')
-rw-r--r--src/particles/qquickellipseextruder.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/particles/qquickellipseextruder.cpp b/src/particles/qquickellipseextruder.cpp
index f4374d801..6016d5966 100644
--- a/src/particles/qquickellipseextruder.cpp
+++ b/src/particles/qquickellipseextruder.cpp
@@ -82,7 +82,13 @@ QPointF QQuickEllipseExtruder::extrude(const QRectF & r)
bool QQuickEllipseExtruder::contains(const QRectF &bounds, const QPointF &point)
{
- return bounds.contains(point);//TODO: Ellipse
+ if (!bounds.contains(point))
+ return false;
+
+ QPointF relPoint(bounds.center() - point);
+ qreal xa = relPoint.x()/bounds.width();
+ qreal yb = relPoint.y()/bounds.height();
+ return (xa * xa + yb * yb) < 0.25;
}
QT_END_NAMESPACE