[Panel-devel] Yo
Zack Rusin
zack at kde.org
Mon Jul 16 23:03:13 CEST 2007
On Monday 16 July 2007 04:54:07 pm Aaron J. Seigo wrote:
> > If we add the panel items in some sort of negative space then
> > we once again lose the collision detection that you were talking
> > about.
>
> this really depends on how qgraphicsscene handles negative coordinates
> (e.g. -10, -10), which i haven't played with at all yet.
It doesn't care. The algorithm should handle all cases independently of the
coordinate system it operates on.
One note though: in general when returning QPainterPath from the shape()
method try returning real bounding paths instead of rendering paths. The
difference being that for collision detection you want to avoid paths with
multiple moveTo's. Path clipping algorithm that we use in graphicsview is
just bad at handling multiple moveTo's. I /think/ I fixed all the collision
detection problems for 4.3.1 and I'm trying to rewrite the algorithm in whole
(mainly for performance reasons) but I doubt that we'll put it in 4.3.1. So
yeah, avoid multiple moveTo's in QGraphicsItem::shape() returned
QPainterPath's.
z
More information about the Panel-devel
mailing list