Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
4.6.0, 4.6.2
-
None
-
Windows XP SP3, Qt 4.6 RC
-
6db96dcd4acccbc13161f85adf3164907b7b5cae
Description
Applying graphics effects to items does not work properly when the graphics view is transformed.
In the attached example application (Windows, Qt 4.6 RC) a drop shadow is applied to a moving item while the graphics view is rotated -90 degrees.
- Expected outcome:
The drop shadow is drawn properly and without any artifacts, no matter how the graphics view is transformed.
- Actual outcome:
The position of the shadow is wrong (looks as if the graphics view had not been rotated) and there are artifacts.
Appendix A:
This may or may not be related, but a QGraphicsEffect's boundingRectFor function is called sometimes with a rect coming from logical coordinates and sometimes with a rect coming from device coordinates.
For example
1. QGraphicsItemPrivate::effectiveBoundingRect
2. calls QGraphicsEffect::boundingRect
3. calls QGraphicsEffectSource::boundingRect with system=LogicalCoordinates
4. the rect is passed to boundingRectFor
vs. (assuming that the effect is requesting the pixmap for its source item in device coordinates)
1. QGraphicsItemEffectSourcePrivate::pixmap
2. calls QGraphicsItemEffectSourcePrivate::boundingRect with system=DeviceCoordinates
3. the rect is passed to boundingRectFor
How are effects supposed to generate the correct bounding rectangle then? (e.g. if a shadow effect wants a shadow under the item with graphics view rotation == 0 but wants the shadow on the right of the
(rotated) item then the graphics view is rotated -90 degrees, then how can it do it? The return value of boundingRectFor() needs to be different in this case for logical and device coordinates.)
Appendix B:
Some pixmap filters have OpenVG-specific implementations in the OpenVG paint engine. These do not seem to care about graphics view transformations either. This could also be a source of similar issues in the future, I suppose.
Attachments
Issue Links
- is required for
-
QTBUG-7917 Symbian4_2010_05
- Closed