Commit 1ffa8a7
committed
MenuItem Image Rounding Error #62
This commit contributes to fixing the logic for scaling ImageData with
Smooth scaling strategy. The previous implementation scales the bounds
of image up and down several times which can lead to rounding error in
case of scaling factor being a fractional value. With this
implementation, the obtained imageData has no rounding error after
ruling out those scale ups and downs and hence improves the menu item
icons.
contributes to
#62 and
#1271 parent 1bc7548 commit 1ffa8a7
File tree
4 files changed
+70
-8
lines changed- bundles/org.eclipse.swt
- Eclipse SWT PI/win32/org/eclipse/swt/internal/win32
- Eclipse SWT
- common/org/eclipse/swt/internal
- win32/org/eclipse/swt
- graphics
- widgets
4 files changed
+70
-8
lines changedLines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1246 | 1246 | | |
1247 | 1247 | | |
1248 | 1248 | | |
| 1249 | + | |
1249 | 1250 | | |
1250 | 1251 | | |
1251 | 1252 | | |
| |||
Lines changed: 17 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
292 | 292 | | |
293 | 293 | | |
294 | 294 | | |
295 | | - | |
| 295 | + | |
296 | 296 | | |
297 | 297 | | |
298 | 298 | | |
| |||
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
319 | 323 | | |
320 | 324 | | |
321 | 325 | | |
| |||
631 | 635 | | |
632 | 636 | | |
633 | 637 | | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
634 | 646 | | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
635 | 651 | | |
636 | 652 | | |
637 | 653 | | |
| |||
Lines changed: 41 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
1420 | 1421 | | |
1421 | 1422 | | |
1422 | 1423 | | |
1423 | | - | |
| 1424 | + | |
1424 | 1425 | | |
1425 | 1426 | | |
1426 | 1427 | | |
| |||
2048 | 2049 | | |
2049 | 2050 | | |
2050 | 2051 | | |
| 2052 | + | |
| 2053 | + | |
| 2054 | + | |
| 2055 | + | |
| 2056 | + | |
| 2057 | + | |
| 2058 | + | |
| 2059 | + | |
| 2060 | + | |
| 2061 | + | |
| 2062 | + | |
| 2063 | + | |
| 2064 | + | |
| 2065 | + | |
| 2066 | + | |
| 2067 | + | |
| 2068 | + | |
| 2069 | + | |
| 2070 | + | |
| 2071 | + | |
| 2072 | + | |
| 2073 | + | |
| 2074 | + | |
| 2075 | + | |
| 2076 | + | |
| 2077 | + | |
| 2078 | + | |
| 2079 | + | |
| 2080 | + | |
| 2081 | + | |
| 2082 | + | |
| 2083 | + | |
| 2084 | + | |
| 2085 | + | |
2051 | 2086 | | |
2052 | 2087 | | |
2053 | 2088 | | |
| |||
2138 | 2173 | | |
2139 | 2174 | | |
2140 | 2175 | | |
2141 | | - | |
| 2176 | + | |
| 2177 | + | |
2142 | 2178 | | |
2143 | 2179 | | |
2144 | 2180 | | |
| |||
2151 | 2187 | | |
2152 | 2188 | | |
2153 | 2189 | | |
2154 | | - | |
| 2190 | + | |
2155 | 2191 | | |
2156 | 2192 | | |
2157 | 2193 | | |
| |||
2201 | 2237 | | |
2202 | 2238 | | |
2203 | 2239 | | |
2204 | | - | |
| 2240 | + | |
2205 | 2241 | | |
2206 | 2242 | | |
2207 | 2243 | | |
2208 | 2244 | | |
2209 | 2245 | | |
2210 | | - | |
| 2246 | + | |
2211 | 2247 | | |
2212 | 2248 | | |
2213 | 2249 | | |
| |||
Lines changed: 11 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
781 | 781 | | |
782 | 782 | | |
783 | 783 | | |
784 | | - | |
785 | | - | |
| 784 | + | |
786 | 785 | | |
787 | 786 | | |
788 | 787 | | |
| |||
792 | 791 | | |
793 | 792 | | |
794 | 793 | | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
795 | 804 | | |
796 | 805 | | |
797 | 806 | | |
| |||
0 commit comments