diff options
author | Sravan Kumar Lakkimsetti | 2015-03-18 11:44:24 +0000 |
---|---|---|
committer | Sravan Kumar Lakkimsetti | 2015-03-18 11:44:24 +0000 |
commit | 7d2822d8073ad81bd38f971b721d8797c932af45 (patch) | |
tree | 3518c9584beacbaf4a87b131b07677836a37eddb /bundles | |
parent | 9b47cd02487f43a7bdd437650645c2180a001e29 (diff) | |
download | eclipse.platform.swt-7d2822d8073ad81bd38f971b721d8797c932af45.tar.gz eclipse.platform.swt-7d2822d8073ad81bd38f971b721d8797c932af45.tar.xz eclipse.platform.swt-7d2822d8073ad81bd38f971b721d8797c932af45.zip |
Bug 421383 - [Graphics] Scaling issues on high DPI displays
Change-Id: I069931cb98f4afe332c43c6883c8c56df9b2913c
Signed-off-by: Sravan Kumar Lakkimsetti <sravankumarl@in.ibm.com>
Diffstat (limited to 'bundles')
2 files changed, 29 insertions, 31 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/graphics/ImageDataProvider.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/graphics/ImageDataProvider.java index 93ab7b90b1..a2e52f13c6 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/graphics/ImageDataProvider.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/graphics/ImageDataProvider.java @@ -12,30 +12,29 @@ package org.eclipse.swt.graphics; /** * Interface to provide a callback mechanism to get information about images - * when the application is moved from low dpi monitor to high dpi. This - * information will be used to render the higher resolution images + * when the application is moved from a low DPI monitor to a high DPI monitor. + * This provides API which will be called by SWT during the image rendering. * - * This interface needs to be implemented by client code and provide the image - * information on demand. This interface provides a callback mechanism to the - * client code to provide ImageData based on the OS as per the zoom - * level. Client can have their own naming convention for various zoom levels + * This interface needs to be implemented by client code to provide the + * image information on demand. * * @since 3.104 */ public interface ImageDataProvider { /** - * Method to retrieve ImageData for a particular zoom level this needs to - * be implemented on the client side + * Retrieves the image data for a particular zoom level. This method needs + * to be implemented on the client side. + * <p> + * If the image is not available for a particular zoom level, please + * fall back to image of 100% level and return its image data. * - * This method should return an object of ImageData. If not available please - * fallback to image of 100% level and send its ImageData + * Note: SWT will throw an exception if this method returns null. * - * Note: SWT will throw exception if this method returns null. - * - * @param zoom - * value will be 100(16x16 image), 150(24x24 image) & 200(32x32 image) - * @return the ImageData of the image + * @param zoom Currently accepted values (sent by SWT) are 100, 150, and 200 + * corresponding to 16x16, 24x24 and 32x32 images respectively. + * + * @return an object of ImageData * @since 3.104 */ public ImageData getImageData (int zoom); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/graphics/ImageFileNameProvider.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/graphics/ImageFileNameProvider.java index 0003eaffaf..a3959ddd9d 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/graphics/ImageFileNameProvider.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/graphics/ImageFileNameProvider.java @@ -12,33 +12,32 @@ package org.eclipse.swt.graphics; /** * Interface to provide a callback mechanism to get information about images - * when the application is moved from low dpi monitor to high dpi. This - * information will be used to render the higher resolution images + * when the application is moved from a low DPI monitor to a high DPI monitor. + * This provides API which will be called by SWT during the image rendering. * - * This interface needs to be implemented by client code and provide the image - * information on demand. This interface provides a callback mechanism to the - * client code to provide file name based on the OS as per the zoom - * level. Client can have their own naming convention for various zoom levels + * This interface needs to be implemented by client code to provide the + * image information on demand. * * @since 3.104 */ public interface ImageFileNameProvider { /** - * Method to retrieve absolute path to filename for a particular zoom level. - * This needs to be implemented on the client side + * Retrieves the filename for a particular zoom level. This method needs + * to be implemented on the client side. + * <p> + * If the image is not available for a particular zoom level, please + * fall back to image of 100% level and return its file name. * - * This method should return a filename available on the filesystem. If not - * available please fallback to image of 100% level and send its absolute - * path as return value. + * Note: SWT will throw an exception if this method returns null. * - * Note: SWT will throw exception if this method returns null. - * - * @param zoom - * value will be 100(16x16 image), 150(24x24 image) & 200(32x32 image) - * @return the absolute file path of the image + * @param zoom Currently accepted values (sent by SWT) are 100, 150, and 200 + * corresponding to 16x16, 24x24 and 32x32 images respectively. + * + * @return an object of String * @since 3.104 */ + public String getImagePath (int zoom); } |