Skip to content

Commit 2658892

Browse files
Update N&N: Clarify rationale for Cursor constructor deprecation in SWT
- Updated the news and noteworthy entry for the deprecation of `Cursor(Device, ImageData, ImageData, int, int)` in SWT. - Clarified that the constructor was deprecated due to limited DPI support. - Explained that the new `Cursor(Device, ImageDataProvider, int, int)` constructor provides the best image for all zoom levels, ensuring proper support for high-DPI displays.
1 parent 53d0364 commit 2658892

File tree

1 file changed

+24
-3
lines changed

1 file changed

+24
-3
lines changed

news/4.38/platform_isv.md

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,28 @@ A special thanks to everyone who [contributed to Eclipse-Platform](acknowledgeme
77
## Platform Changes
88
-->
99

10-
<!--
11-
---
10+
1211
## SWT Changes
13-
-->
12+
13+
### Cursor Constructor Deprecation and Replacement
14+
15+
<details>
16+
<summary>Contributors</summary>
17+
18+
- [Shahzaib Ibrahim](https://github.com/ShahzaibIbrahim)
19+
</details>
20+
21+
The constructor `Cursor(Device, ImageData, ImageData, int, int)` has been **deprecated** in SWT due to its limited DPI support.
22+
23+
This constructor requires separate source and mask image data. However, this approach has become uncommon, as modern practices typically encode mask data directly into the image data itself (for example, by using alpha channels). For this reason, the constructor that accepts a single `ImageData` object (containing both the image and mask information) is **not** deprecated and remains the recommended approach.
24+
25+
You should now use the new constructor:
26+
27+
```
28+
Cursor(Device, ImageDataProvider, int, int)
29+
```
30+
31+
The new `ImageDataProvider`-based constructor ensures you get the best image for the cursor at all zoom levels, providing proper support for high-DPI displays and modern environments.
32+
33+
**Action Required:**
34+
Please update your code to use the new constructor for better compatibility and future-proofing.

0 commit comments

Comments
 (0)