View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0032465 | Lazarus | LCL | public | 2017-09-25 04:15 | 2017-09-27 20:30 |
Reporter | Vojtech Cihak | Assigned To | Zeljan Rikalo | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | amd64 | OS | Linux | ||
Product Version | 1.9 (SVN) | ||||
Summary | 0032465: Graphic inconsistency Canvas.Pen | ||||
Description | Graphic drawn by Canvas.Pen is inconsistent now. Qt is broken from revision 53046. Other widgetsets are OK. See attached screenshot - glyphs from EC-Controls. Guilty patch: https://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/lcl/include/pen.inc?root=lazarus&r1=53046&r2=53045&pathrev=53046 | ||||
Steps To Reproduce | I don't know how to make some meaningful demo. Simply said, lines in QT are one pixel longer than it should be. | ||||
Additional Information | Lazarus 1.9.0 r55918M FPC 3.0.2 x86_64-linux-qt | ||||
Tags | No tags attached. | ||||
Fixed in Revision | 55934 | ||||
LazTarget | - | ||||
Widgetset | QT | ||||
Attached Files |
|
related to | 0022646 | resolved | Bart Broersma | Draw line at Pen.Style: = psPattern and Pen.width: = 1. |
|
|
|
issue32465fix.diff (1,081 bytes)
Index: lcl/include/pen.inc =================================================================== --- lcl/include/pen.inc (revision 55914) +++ lcl/include/pen.inc (working copy) @@ -389,10 +389,18 @@ if IsGeometric then elpWidth := Width else - //(https://msdn.microsoft.com/en-us/library/windows/desktop/dd162705(v=vs.85).aspx - //https://msdn.microsoft.com/en-us/library/windows/desktop/dd162711(v=vs.85).aspx - //Issue #0022646 - elpWidth := 1; + begin + // issue #32465, regression from fixing #22646. Pure cosmetic + // pen is created via TLogPen, not via TExtLogPen + if ((elpPenStyle and PS_STYLE_MASK) = elpPenStyle) and + (elpPenStyle <> PS_USERSTYLE) then + elpWidth := 0 + else + //(https://msdn.microsoft.com/en-us/library/windows/desktop/dd162705(v=vs.85).aspx + //https://msdn.microsoft.com/en-us/library/windows/desktop/dd162711(v=vs.85).aspx + //Issue #0022646 + elpWidth := 1; + end; elpBrushStyle := BS_SOLID; elpColor := TColorRef(FColor); end; |
|
IMO, author of the commit forgot that simple pen reference is created via CreatePenIndirect() using TLogPen, not TExtLogPen which he points in msdn documentation. Setting width for cosmetic pens make such pen non-cosmetic at least under qt on all platforms. @Vojtech please test with attached patch. |
|
Patch works, thanks. Can someone with Win test whether it does not break the related issue? |
|
IMO, it should not break anything since regression commit is TExtLogPen related, not TLogPen. |
|
> Can someone with Win test whether it does not break the related issue? I ran the demo accompanying issue 0022646 on Win 10 with this modification in trunk and compared it with 1.8RC4 - no difference. |
|
Thanks wp |
|
Please test and close if ok. |
|
Tested with r55934. Thanks. |
Date Modified | Username | Field | Change |
---|---|---|---|
2017-09-25 04:15 | Vojtech Cihak | New Issue | |
2017-09-25 04:15 | Vojtech Cihak | File Added: compare.png | |
2017-09-25 12:10 | Zeljan Rikalo | Relationship added | related to 0022646 |
2017-09-25 17:01 | Zeljan Rikalo | Assigned To | => Zeljan Rikalo |
2017-09-25 17:01 | Zeljan Rikalo | Status | new => assigned |
2017-09-25 17:01 | Zeljan Rikalo | File Added: issue32465fix.diff | |
2017-09-25 17:03 | Zeljan Rikalo | LazTarget | => - |
2017-09-25 17:03 | Zeljan Rikalo | Note Added: 0103039 | |
2017-09-25 17:03 | Zeljan Rikalo | Status | assigned => feedback |
2017-09-25 20:43 | Vojtech Cihak | Note Added: 0103044 | |
2017-09-25 20:43 | Vojtech Cihak | Status | feedback => assigned |
2017-09-26 11:27 | Zeljan Rikalo | Note Added: 0103060 | |
2017-09-26 17:24 | wp | Note Added: 0103070 | |
2017-09-26 19:06 | Zeljan Rikalo | Note Added: 0103075 | |
2017-09-27 15:18 | Zeljan Rikalo | Fixed in Revision | => 55934 |
2017-09-27 15:18 | Zeljan Rikalo | Note Added: 0103096 | |
2017-09-27 15:18 | Zeljan Rikalo | Status | assigned => resolved |
2017-09-27 15:18 | Zeljan Rikalo | Resolution | open => fixed |
2017-09-27 20:30 | Vojtech Cihak | Note Added: 0103097 | |
2017-09-27 20:30 | Vojtech Cihak | Status | resolved => closed |