Commit 7d0ec2a
[Win32] Fix wrong line width in GC upon recreation for different zoom
The Win32 implementation of the GC class stores executed operations to
allow the recreation of the underlying drawable's handle for a different
zoom if requested. The setLineAttributes() operation stores the passed
line attributes including the line width. Once this operation is
applied, the line width is transformed from point into pixel
coordinates. Instead of just using the pixel value during operation
execution, the actual attribute value (in points) of the operation is
overwritten, such that subsequent applications of that operation will
use a wrong value.
This change adapts the implementation of the SetLineAttributes operation
to not overwrite the original line attributes. In addition, it extracts
the point-to-pixel conversion for dashes that was erroneously placed
inside the called setLineAttributesInPixels method so that a proper line
attributes object transformed into pixel values is passed to that
method.1 parent 716e80e commit 7d0ec2a
3 files changed
Lines changed: 35 additions & 8 deletions
File tree
- bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt
- graphics
- internal
- tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit
Lines changed: 9 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5361 | 5361 | | |
5362 | 5362 | | |
5363 | 5363 | | |
5364 | | - | |
5365 | | - | |
| 5364 | + | |
| 5365 | + | |
| 5366 | + | |
| 5367 | + | |
| 5368 | + | |
| 5369 | + | |
| 5370 | + | |
| 5371 | + | |
| 5372 | + | |
5366 | 5373 | | |
5367 | 5374 | | |
5368 | 5375 | | |
| |||
5424 | 5431 | | |
5425 | 5432 | | |
5426 | 5433 | | |
5427 | | - | |
5428 | | - | |
5429 | | - | |
5430 | | - | |
5431 | | - | |
5432 | | - | |
5433 | 5434 | | |
5434 | 5435 | | |
5435 | 5436 | | |
| |||
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
240 | 240 | | |
241 | 241 | | |
242 | 242 | | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
243 | 258 | | |
244 | 259 | | |
245 | 260 | | |
| |||
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
855 | 855 | | |
856 | 856 | | |
857 | 857 | | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
858 | 869 | | |
859 | 870 | | |
860 | 871 | | |
| |||
0 commit comments