src/macosx/classes/sun/lwawt/macosx/CImage.java

Print this page




  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package sun.lwawt.macosx;
  27 
  28 import java.awt.*;
  29 import java.awt.geom.Dimension2D;
  30 import java.awt.image.*;
  31 
  32 import java.util.Arrays;
  33 import java.util.List;
  34 import sun.awt.image.MultiResolutionImage;
  35 import sun.awt.image.MultiResolutionBufferedImage;
  36 
  37 import sun.awt.image.SunWritableRaster;
  38 
  39 public class CImage extends CFRetainedResource {
  40     private static native long nativeCreateNSImageFromArray(int[] buffer, int w, int h);
  41     private static native long nativeCreateNSImageFromBytes(byte[] buffer);
  42     private static native long nativeCreateNSImageFromArrays(int[][] buffers, int w[], int h[]);
  43     private static native long nativeCreateNSImageFromFileContents(String file);
  44     private static native long nativeCreateNSImageOfFileFromLaunchServices(String file);
  45     private static native long nativeCreateNSImageFromImageName(String name);
  46     private static native long nativeCreateNSImageFromIconSelector(int selector);
  47     private static native byte[] nativeGetPlatformImageBytes(int[] buffer, int w, int h);
  48     private static native void nativeCopyNSImageIntoArray(long image, int[] buffer, int sw, int sh, int dw, int dh);
  49     private static native Dimension2D nativeGetNSImageSize(long image);
  50     private static native void nativeSetNSImageSize(long image, double w, double h);
  51     private static native void nativeResizeNSImageRepresentations(long image, double w, double h);
  52     private static native Dimension2D[] nativeGetNSImageRepresentationSizes(long image, double w, double h);
  53 
  54     static Creator creator = new Creator();




  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package sun.lwawt.macosx;
  27 
  28 import java.awt.*;
  29 import java.awt.geom.Dimension2D;
  30 import java.awt.image.*;
  31 
  32 import java.util.Arrays;
  33 import java.util.List;
  34 import java.awt.image.MultiResolutionImage;
  35 import sun.awt.image.MultiResolutionBufferedImage;
  36 
  37 import sun.awt.image.SunWritableRaster;
  38 
  39 public class CImage extends CFRetainedResource {
  40     private static native long nativeCreateNSImageFromArray(int[] buffer, int w, int h);
  41     private static native long nativeCreateNSImageFromBytes(byte[] buffer);
  42     private static native long nativeCreateNSImageFromArrays(int[][] buffers, int w[], int h[]);
  43     private static native long nativeCreateNSImageFromFileContents(String file);
  44     private static native long nativeCreateNSImageOfFileFromLaunchServices(String file);
  45     private static native long nativeCreateNSImageFromImageName(String name);
  46     private static native long nativeCreateNSImageFromIconSelector(int selector);
  47     private static native byte[] nativeGetPlatformImageBytes(int[] buffer, int w, int h);
  48     private static native void nativeCopyNSImageIntoArray(long image, int[] buffer, int sw, int sh, int dw, int dh);
  49     private static native Dimension2D nativeGetNSImageSize(long image);
  50     private static native void nativeSetNSImageSize(long image, double w, double h);
  51     private static native void nativeResizeNSImageRepresentations(long image, double w, double h);
  52     private static native Dimension2D[] nativeGetNSImageRepresentationSizes(long image, double w, double h);
  53 
  54     static Creator creator = new Creator();