diff options
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java index 985f8b56d7..c45b238611 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2015 IBM Corporation and others. + * Copyright (c) 2000, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -1347,7 +1347,10 @@ public Rectangle getBounds() { } return bounds; } - + +/** + * @return a rectangle specifying the image's bounds at current zoom. + */ Rectangle _getBounds() { if (width != -1 && height != -1) { return new Rectangle(0, 0, width, height); @@ -1404,13 +1407,13 @@ public Rectangle getBounds(int zoom) { */ public ImageData getImageData() { if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); - ImageData imageData = _getImageData(); - if (imageData != null && getEnableAutoScaling()) { - data = DPIUtil.autoScaleImageData(data, 100, currentDeviceZoom); - } - return imageData; + return getImageData(100); } +/** + * @return an <code>ImageData</code> containing the image's data and + * attributes at current zoom level. + */ ImageData _getImageData() { if (OS.USE_CAIRO) { long /*int*/ surface = ImageList.convertSurface(this); |