View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0026744 | Lazarus | Widgetset | public | 2014-09-19 15:14 | 2014-09-22 13:19 |
Reporter | Vojtech Cihak | Assigned To | Zeljan Rikalo | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | amd64 | OS | Linux | ||
Product Version | 1.3 (SVN) | ||||
Target Version | 1.2.6 | ||||
Summary | 0026744: [Qt] CopyRect - regression of 26004 | ||||
Description | CopyRect should copy only a piece of canvas but it stretch-copy all. Regression of 26004. | ||||
Steps To Reproduce | Use the demo attached here: http://bugs.freepascal.org/view.php?id=26004 Click on InvalidateRect shows red/yellow rectangle while it should be only red. | ||||
Additional Information | Lazarus 1.3 r46204M FPC 2.7.1 x86_64-linux-qt | ||||
Tags | No tags attached. | ||||
Fixed in Revision | 46282 | ||||
LazTarget | 1.2.6 | ||||
Widgetset | QT | ||||
Attached Files |
|
related to | 0026004 | closed | Zeljan Rikalo | CopyRect+InvalidateRect issue [Qt] |
has duplicate | 0026745 | closed | Zeljan Rikalo | [Qt] CopyRect - regression of 26004 |
|
Seem like Qt version related. Here with 4.7.4 32bit it looks good. What's your qt version ? |
|
My Qt is 64-bit, 4.8.6. KDE is 4.14.1. |
|
Just tested on my laptop with Fedora 19 64bit Qt-4.8.6 and yes, issue is present. Now must find at least 4.8.5 somewhere and check against it,or pass through changes log of Qt to see where they touched clipping. |
|
Bug exists only with -graphicssystem raster (which is default on modern distros), with -graphicssystem native it looks good.Can reproduce with 4.7.4 too. |
|
Setted up laztarget to 1.2.6 |
|
qt_rasterengine_clip_bug.diff (1,745 bytes)
Index: lcl/interfaces/qt/qtwinapi.inc =================================================================== --- lcl/interfaces/qt/qtwinapi.inc (revision 46270) +++ lcl/interfaces/qt/qtwinapi.inc (working copy) @@ -6649,14 +6649,22 @@ begin AClipRect := DstQDC.getClipRegion.getBoundingRect; OffsetRect(AClipRect, -AClipRect.Left, -AClipRect.Top); + if (DstRect.Right - DstRect.Left <= AClipRect.Right) and (DstRect.Bottom - DstRect.Top <= AClipRect.Bottom) and - DstQDC.getClipRegion.containsPoint(DstRect.Left, DstRect.Top) and - // issue #26342, unset clipping only when transform is dirty - QPaintEngine_testDirty(DstQDC.PaintEngine, QPaintEngineDirtyTransform) then + DstQDC.getClipRegion.containsPoint(DstRect.Left, DstRect.Top) then begin - RestoreClip := True; - DstQDC.setClipping(False); + if (QPaintEngine_type(DstQDC.PaintEngine) = QPaintEngineRaster) then + begin + // issue #26744 - only affects raster engine. + RestoreClip := ((DstRect.Left > 0) or (DstRect.Top > 0)) and + (DstRect.Right - DstRect.Left - AClipRect.Right - AClipRect.Left = 0) and + (DstRect.Bottom - DstRect.Top - AClipRect.Bottom - AClipRect.Top = 0); + end else + // issue #26342, unset clipping only when transform is dirty with non raster engine. + RestoreClip := QPaintEngine_testDirty(DstQDC.PaintEngine, QPaintEngineDirtyTransform); + if RestoreClip then + DstQDC.setClipping(False); end; end; DstQDC.drawImage(@DstRect, Image, @SrcRect, QMask, @MaskRect); |
|
Please test with attached patch (if possible do heavy test with any example you have). If it's ok I'll commit. |
|
I applied path - works well. I tested with demo and with my TECRadioGroup and TECCheckGroup (these were components where I always notice this issue). |
|
Please test and close if ok. |
|
Tested with r.46287. Thanks. |
Date Modified | Username | Field | Change |
---|---|---|---|
2014-09-19 15:14 | Vojtech Cihak | New Issue | |
2014-09-20 09:43 | Juha Manninen | Relationship added | related to 0026004 |
2014-09-20 09:44 | Juha Manninen | Assigned To | => Zeljan Rikalo |
2014-09-20 09:44 | Juha Manninen | Status | new => assigned |
2014-09-21 12:16 | Zeljan Rikalo | Relationship added | has duplicate 0026745 |
2014-09-21 12:19 | Zeljan Rikalo | LazTarget | => - |
2014-09-21 12:19 | Zeljan Rikalo | Note Added: 0077481 | |
2014-09-21 12:19 | Zeljan Rikalo | Status | assigned => feedback |
2014-09-21 13:07 | Vojtech Cihak | Note Added: 0077483 | |
2014-09-21 13:07 | Vojtech Cihak | Status | feedback => assigned |
2014-09-21 13:09 | Zeljan Rikalo | Note Added: 0077484 | |
2014-09-21 13:09 | Zeljan Rikalo | Status | assigned => confirmed |
2014-09-21 13:13 | Zeljan Rikalo | Note Added: 0077485 | |
2014-09-21 13:13 | Zeljan Rikalo | Status | confirmed => feedback |
2014-09-21 13:13 | Zeljan Rikalo | LazTarget | - => 1.2.6 |
2014-09-21 13:13 | Zeljan Rikalo | Note Added: 0077486 | |
2014-09-21 13:13 | Zeljan Rikalo | Status | feedback => assigned |
2014-09-21 13:13 | Zeljan Rikalo | Target Version | => 1.2.6 |
2014-09-21 14:10 | Zeljan Rikalo | File Added: qt_rasterengine_clip_bug.diff | |
2014-09-21 14:11 | Zeljan Rikalo | Note Added: 0077489 | |
2014-09-21 14:11 | Zeljan Rikalo | Status | assigned => feedback |
2014-09-21 16:51 | Vojtech Cihak | Note Added: 0077494 | |
2014-09-21 16:51 | Vojtech Cihak | Status | feedback => assigned |
2014-09-22 08:02 | Zeljan Rikalo | Fixed in Revision | => 46282 |
2014-09-22 08:02 | Zeljan Rikalo | Note Added: 0077514 | |
2014-09-22 08:02 | Zeljan Rikalo | Status | assigned => resolved |
2014-09-22 08:02 | Zeljan Rikalo | Resolution | open => fixed |
2014-09-22 13:19 | Vojtech Cihak | Note Added: 0077524 | |
2014-09-22 13:19 | Vojtech Cihak | Status | resolved => closed |