From 988ffedd00ce3968c7d00662c1a44ef16306232c Mon Sep 17 00:00:00 2001 From: arunjose696 Date: Fri, 8 Aug 2025 10:47:19 +0200 Subject: [PATCH] Add N&N for clarified ImageDataProvider contract and debugging support Clarifies the requirement to an ImageDataProvider implementation of returning linearly scaled image data and refers to debugging support for linear scaling. --- news/4.37/platform_isv.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/news/4.37/platform_isv.md b/news/4.37/platform_isv.md index ab7db09b..a9a17e4f 100644 --- a/news/4.37/platform_isv.md +++ b/news/4.37/platform_isv.md @@ -36,9 +36,14 @@ Display.getDefault().asyncExec(() -> { }); ``` - +### Clarified ImageDataProvider Contract + +The `ImageDataProvider` API documentation has been updated to clarify that implementations are expected to return **linearly scaled** `ImageData` based on the zoom level. +For example, if `getImageData(100)` returns an image of width `w` and height `h`, then `getImageData(200)` must return an image of width `2 * w` and height `2 * h`, if non-null. +This only makes an implicit assumption explicit, some consumers have always relied on this linear scaling behavior, and lack of it may have led to unexpected behavior in the past. +Additionally, optional runtime checks verifying this linear scaling behavior are available as a debugging feature to assist developers in validating their implementations. +These checks can be enabled by starting the application with `-Dorg.eclipse.swt.internal.enableStrictChecks`, but note that this system property may be subject to change in future releases without prior notice.