diff options
author | Silenio Quarti <silenio> | 2008-06-02 14:39:35 +0000 |
---|---|---|
committer | Silenio Quarti <silenio> | 2008-06-02 14:39:35 +0000 |
commit | 152b200e4a077c009176d473243bb5391e1847ed (patch) | |
tree | c6c5d3b05853a4b65f6a0c4639619fe759aee26b | |
parent | 99b4b8d1e2c60a609e05fea08b649f93dd15cfc9 (diff) | |
download | eclipse.platform.swt-152b200e4a077c009176d473243bb5391e1847ed.tar.gz eclipse.platform.swt-152b200e4a077c009176d473243bb5391e1847ed.tar.xz eclipse.platform.swt-152b200e4a077c009176d473243bb5391e1847ed.zip |
219437 - Javadocs of get/setAlpha(..) should specify range of value
3 files changed, 17 insertions, 6 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/graphics/ImageData.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/graphics/ImageData.java index 0e45eb9cd0..4d4f7d88cf 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/graphics/ImageData.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/graphics/ImageData.java @@ -581,6 +581,8 @@ public Object clone() { /** * Returns the alpha value at offset <code>x</code> in * scanline <code>y</code> in the receiver's alpha data. + * The alpha value is between 0 (transparent) and + * 255 (opaque). * * @param x the x coordinate of the pixel to get the alpha value of * @param y the y coordinate of the pixel to get the alpha value of @@ -600,7 +602,9 @@ public int getAlpha(int x, int y) { /** * Returns <code>getWidth</code> alpha values starting at offset * <code>x</code> in scanline <code>y</code> in the receiver's alpha - * data starting at <code>startIndex</code>. + * data starting at <code>startIndex</code>. The alpha values + * are unsigned, between <code>(byte)0</code> (transparent) and + * <code>(byte)255</code> (opaque). * * @param x the x position of the pixel to begin getting alpha values * @param y the y position of the pixel to begin getting alpha values @@ -1151,6 +1155,8 @@ public ImageData scaledTo(int width, int height) { /** * Sets the alpha value at offset <code>x</code> in * scanline <code>y</code> in the receiver's alpha data. + * The alpha value must be between 0 (transparent) + * and 255 (opaque). * * @param x the x coordinate of the alpha value to set * @param y the y coordinate of the alpha value to set @@ -1172,7 +1178,8 @@ public void setAlpha(int x, int y, int alpha) { * Sets the alpha values starting at offset <code>x</code> in * scanline <code>y</code> in the receiver's alpha data to the * values from the array <code>alphas</code> starting at - * <code>startIndex</code>. + * <code>startIndex</code>. The alpha values must be between + * <code>(byte)0</code> (transparent) and <code>(byte)255</code> (opaque) * * @param x the x coordinate of the pixel to being setting the alpha values * @param y the y coordinate of the pixel to being setting the alpha values diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GC.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GC.java index 83ebd076ec..fb2035c748 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GC.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GC.java @@ -2961,7 +2961,8 @@ public boolean getAdvanced() { } /** - * Returns the receiver's alpha value. + * Returns the receiver's alpha value. The alpha value + * is between 0 (transparent) and 255 (opaque). * * @return the alpha value * @@ -3886,7 +3887,8 @@ public void setAntialias(int antialias) { } /** - * Sets the receiver's alpha value. + * Sets the receiver's alpha value which must be + * between 0 (transparent) and 255 (opaque). * <p> * This operation requires the operating system's advanced * graphics subsystem which may not be available on some diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Shell.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Shell.java index 5e0520fcbe..617fde5343 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Shell.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Shell.java @@ -831,7 +831,8 @@ void forceResize () { } /** - * Returns the receiver's alpha value. + * Returns the receiver's alpha value. The alpha value + * is between 0 (transparent) and 255 (opaque). * * @return the alpha value * @@ -1352,7 +1353,8 @@ void setActiveControl (Control control) { } /** - * Sets the receiver's alpha value. + * Sets the receiver's alpha value which must be + * between 0 (transparent) and 255 (opaque). * <p> * This operation requires the operating system's advanced * widgets subsystem which may not be available on some |