aboutsummaryrefslogtreecommitdiffstats
path: root/src/nativewindow/classes/javax/media
diff options
context:
space:
mode:
Diffstat (limited to 'src/nativewindow/classes/javax/media')
-rw-r--r--src/nativewindow/classes/javax/media/nativewindow/ScalableSurface.java26
1 files changed, 10 insertions, 16 deletions
diff --git a/src/nativewindow/classes/javax/media/nativewindow/ScalableSurface.java b/src/nativewindow/classes/javax/media/nativewindow/ScalableSurface.java
index 024f22bc9..f6101034b 100644
--- a/src/nativewindow/classes/javax/media/nativewindow/ScalableSurface.java
+++ b/src/nativewindow/classes/javax/media/nativewindow/ScalableSurface.java
@@ -30,7 +30,7 @@ package javax.media.nativewindow;
/**
* Adding mutable surface pixel scale property to implementing class, usually to a {@link NativeSurface} implementation,
- * see {@link #setSurfaceScale(int[])}.
+ * see {@link #setSurfaceScale(int[], int[])}.
*/
public interface ScalableSurface {
/** Setting surface-pixel-scale of {@value}, results in same pixel- and window-units. */
@@ -39,7 +39,8 @@ public interface ScalableSurface {
public static final int AUTOMAX_PIXELSCALE = 0;
/**
- * Request a pixel scale in x- and y-direction for the associated {@link NativeSurface}.
+ * Request a pixel scale in x- and y-direction for the associated {@link NativeSurface}
+ * and return the validated requested value, see below.
* <p>
* Default pixel scale request for both directions is {@link #AUTOMAX_PIXELSCALE}.
* </p>
@@ -49,31 +50,24 @@ public interface ScalableSurface {
* </p>
* <p>
* The <i>requested</i> pixel scale will be validated against platform limits before native scale-setup,
- * i.e. clipped to {@link #IDENTITY_PIXELSCALE} if not supported or the platform maximum.
+ * i.e. clipped to {@link #IDENTITY_PIXELSCALE} if not supported or clipped to the platform maximum.
* </p>
* <p>
* The actual <i>realized</i> pixel scale values of the {@link NativeSurface}
* can be queried via {@link #getSurfaceScale(int[])} or
* computed via <code>surface.{@link NativeSurface#convertToPixelUnits(int[]) convertToPixelUnits}(new int[] { 1, 1 })</code>
* </p>
- *
+ * @param result int[2] storage for the result, maybe null
* @param pixelScale <i>requested</i> surface pixel scale int[2] values for x- and y-direction.
+ * @return the passed storage containing the validated requested pixelSize for chaining, if storage is not null
*/
- public void setSurfaceScale(final int[] pixelScale);
+ public int[] setSurfaceScale(final int[] result, final int[] pixelScale);
/**
- * Returns the pixel scale of the associated {@link NativeSurface}.
- * <p>
- * In case the {@link NativeSurface} is not yet realized, method returns the
- * requested pixel scale as validated via {@link #setSurfaceScale(int[])}
- * if called earlier or the implementation default, usually {@link #AUTOMAX_PIXELSCALE}.
- * </p>
- * <p>
- * In case the {@link NativeSurface} is already realized, method returns the
- * actual used pixel scale.
- * </p>
+ * Returns the current pixel scale of the associated {@link NativeSurface}.
+ *
* @param result int[2] storage for the result
- * @return the passed storage for chaining
+ * @return the passed storage containing the current pixelSize for chaining
*/
public int[] getSurfaceScale(final int[] result);
}