View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0033866 | Lazarus | Widgetset | public | 2018-06-16 10:25 | 2019-06-15 15:23 |
Reporter | Anton Kavalenka | Assigned To | Jesus Reyes | ||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | closed | Resolution | fixed | ||
Platform | x86_64 | OS | Linux | ||
Product Version | 1.9 (SVN) | ||||
Fixed in Version | 2.1 (SVN) | ||||
Summary | 0033866: gtk2: Pen pattern depends on line length | ||||
Description | Setting the pen style to psDot at some canvas size creates shifted (misaligned) pattern. It is found that 2nd parameter (0) of laz_gdk_gc_set_dashes(GC, 0, @ADashes[0], Length(ADashes)); meant to be from GTK2 documentation: https://developer.gnome.org/gdk2/stable/gdk2-Graphics-Contexts.html#gdk-gc-set-dashes The dash_offset defines the phase of the pattern, specifying how many pixels into the dash-list the pattern should actually begin. | ||||
Steps To Reproduce | Run the attached project and try to resize form. | ||||
Tags | No tags attached. | ||||
Fixed in Revision | 61378 | ||||
LazTarget | 2.0.4 | ||||
Widgetset | GTK 2 | ||||
Attached Files |
|
related to | 0035662 | resolved | Jesus Reyes | Patches | Grid: pretty lines for GridLineStyle=psDot on Win32 |
|
|
|
|
|
|
|
dashes.diff (448 bytes)
Index: gtk2devicecontext.inc =================================================================== --- gtk2devicecontext.inc (revision 58287) +++ gtk2devicecontext.inc (working copy) @@ -1151,7 +1151,7 @@ for i := Low(ADashes) to High(ADashes) do ADashes[i] := ADashes[i] * Multiplier; - laz_gdk_gc_set_dashes(GC, 0, @ADashes[0], Length(ADashes)); + laz_gdk_gc_set_dashes(GC, 4096, @ADashes[0], Length(ADashes)); end; begin |
|
patch provided |
|
I cannot see the "ugly lines" issue here (Ubuntu 18.x). Demo paints nice pixel lines. After applying the fix- still the same. |
|
Found the same, with the attached test project there is no difference between the patched or unpatched code. But, I made a test under Turbo Delphi, and it doesn't look any similar, beside, it seems line drawing doesn't respect brush style. I will attach some pictures: SinAnton.png, ConAnton.png, which correspond to linux mint without and with anton patch respectively. The third, how it looks in Turbo Delphi. In the case that this style "beautiful psDot" wished to be added, then a new TPenStyle have to be added. The proposed patch doesn't implement that... |
|
|
|
|
|
|
|
Strange - I've compiled and run my own test on Debian Stretch 9.9 Package: libgtk2.0-0 Version: 2.24.31-2 GNOME 3.22.2 on nVidia proprietary drivers. No problems. The "lost" pixels were made on Debian 10 Buster GNOME 3.30 with Intel graphics - maybe that the cause. I will test again. |
|
Still reproducible Package: libgtk2.0-0 Version: 2.24.32-3 GNOME 3.30.2 Debian Buster/Sid 10 X.Org version: 1.20.3 patch helps |
|
Patch applied as it makes no difference in some systems but it fixes a bug in others. Thanks. |
|
Looks like GTK2 dashed lines in Debian Unstable is broken https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=869382 |
Date Modified | Username | Field | Change |
---|---|---|---|
2018-06-16 10:25 | Anton Kavalenka | New Issue | |
2018-06-16 10:25 | Anton Kavalenka | File Added: laztest109.zip | |
2018-06-16 10:26 | Anton Kavalenka | File Added: Здымак экрана, 2018-06-16 11-16-21.png | |
2018-06-16 10:26 | Anton Kavalenka | File Added: Здымак экрана, 2018-06-16 11-16-51.png | |
2018-06-16 10:29 | Anton Kavalenka | File Added: dashes.diff | |
2018-06-16 10:29 | Anton Kavalenka | Note Added: 0108926 | |
2019-06-11 09:42 | CudaText man | Note Added: 0116673 | |
2019-06-12 08:38 | Jesus Reyes | Note Added: 0116682 | |
2019-06-12 08:40 | Jesus Reyes | File Added: SinAnton.png | |
2019-06-12 08:40 | Jesus Reyes | File Added: conAnton.png | |
2019-06-12 08:43 | Jesus Reyes | File Added: TurboDelphi.png | |
2019-06-12 08:46 | Jesus Reyes | File Added: TurboDelphi_dots.png | |
2019-06-12 08:50 | Jesus Reyes | Note Edited: 0116682 | View Revisions |
2019-06-12 08:53 | Jesus Reyes | Relationship added | related to 0035662 |
2019-06-12 17:29 | Anton Kavalenka | Note Added: 0116696 | |
2019-06-12 21:09 | Anton Kavalenka | Note Added: 0116700 | |
2019-06-12 21:09 | Anton Kavalenka | Note Edited: 0116700 | View Revisions |
2019-06-13 18:43 | Jesus Reyes | Assigned To | => Jesus Reyes |
2019-06-13 18:43 | Jesus Reyes | Status | new => assigned |
2019-06-13 19:12 | Jesus Reyes | Status | assigned => resolved |
2019-06-13 19:12 | Jesus Reyes | Resolution | open => fixed |
2019-06-13 19:12 | Jesus Reyes | Fixed in Version | => 2.1 (SVN) |
2019-06-13 19:12 | Jesus Reyes | Fixed in Revision | => 61378 |
2019-06-13 19:12 | Jesus Reyes | LazTarget | => 2.0.4 |
2019-06-13 19:12 | Jesus Reyes | Widgetset | GTK 2 => GTK 2 |
2019-06-13 19:12 | Jesus Reyes | Note Added: 0116710 | |
2019-06-13 19:58 | Anton Kavalenka | Note Added: 0116712 | |
2019-06-15 15:23 | Anton Kavalenka | Status | resolved => closed |