File tree Expand file tree Collapse file tree 1 file changed +17
-4
lines changed Expand file tree Collapse file tree 1 file changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -36,9 +36,22 @@ Display.getDefault().asyncExec(() -> {
3636});
3737```
3838
39- <!--
40- ---
41- ## SWT Changes
42- -->
4339
40+ ## SWT Changes
4441
42+ ### Clarified ImageDataProvider Contract
43+
44+ The ` ImageDataProvider ` API documentation has been updated to clarify that
45+ implementations are expected to return ** linearly scaled** ` ImageData `
46+ based on the zoom level. For example, if ` getImageData(100) ` returns
47+ an image of width * w* and height * h* , then ` getImageData(200) ` must
48+ return an image of width ` 2 * w ` and height ` 2 * h ` , if non-null.
49+ This is only makes an implicit assumption explicit, some consumers have always
50+ relied on this linear scaling behavior, and lack of it may have led to unexpected behavior in the past.
51+
52+ Additionally, strict runtime checks verifying this linear scaling behavior
53+ are available as a debugging feature to assist developers in validating
54+ their implementations.
55+ These checks can be enabled by starting Java with the ` -Dorg.eclipse.swt.internal.enableStrictChecks ` ,
56+ but note that this system property may be subject to change in future releases without
57+ prior notice.
You can’t perform that action at this time.
0 commit comments