@@ -28,16 +28,31 @@ public interface ImageDataProvider {
2828
2929 /**
3030 * Returns the image data for the given zoom level.
31- * <p>
32- * If no image is available for a particular zoom level, this method should
33- * return <code>null</code>. For <code>zoom == 100</code>, returning
34- * <code>null</code> is not allowed, and SWT will throw an exception.
31+ *
32+ * <ul>
33+ * <li>
34+ * If no image is available for a particular zoom level, this method should
35+ * return <code>null</code>. For <code>zoom == 100</code>, returning
36+ * <code>null</code> is not allowed, and SWT will throw an exception.
37+ * </li>
38+ * <li>
39+ * Implementations are expected to return {@link ImageData} that is
40+ * <b>linearly scaled</b> with respect to the zoom level.
41+ * For example, if <code>getImageData(100)</code> returns an image of
42+ * width <code>w</code> and height <code>h</code>, then
43+ * <code>getImageData(200)</code> must return an {@link ImageData}
44+ * of width <code>2 * w</code> and height <code>2 * h</code>,
45+ * if a non-{@code null} result is returned.
46+ * </li>
47+ * </ul>
48+ *
3549 *
3650 * @param zoom
3751 * The zoom level in % of the standard resolution (which is 1
3852 * physical monitor pixel == 1 SWT logical point). Typically 100,
3953 * 150, or 200.
40- * @return the image data, or <code>null</code> if <code>zoom != 100</code>
54+ * @return the linearly scaled image data for the given zoom level,
55+ * or <code>null</code> if <code>zoom != 100</code>
4156 * and no image is available for the given zoom level.
4257 * @since 3.104
4358 */
0 commit comments