1 /*
2 * Copyright (c) 1995, 2007, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
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 package java.awt;
26
27 import java.awt.image.ImageProducer;
28 import java.awt.image.ImageObserver;
29 import java.awt.image.ImageFilter;
30 import java.awt.image.FilteredImageSource;
31 import java.awt.image.AreaAveragingScaleFilter;
32 import java.awt.image.ReplicateScaleFilter;
33
34 import sun.awt.image.SurfaceManager;
35
36 import javax.tools.annotation.GenerateNativeHeader;
37
38 /**
39 * The abstract class <code>Image</code> is the superclass of all
40 * classes that represent graphical images. The image must be
41 * obtained in a platform-specific manner.
42 *
43 * @author Sami Shaio
44 * @author Arthur van Hoff
45 * @since JDK1.0
46 */
47 /* No native methods here, but the constants are needed in the supporting JNI code */
48 @GenerateNativeHeader
49 public abstract class Image {
50
51 /**
52 * convenience object; we can use this single static object for
53 * all images that do not create their own image caps; it holds the
54 * default (unaccelerated) properties.
55 */
56 private static ImageCapabilities defaultImageCaps =
57 new ImageCapabilities(false);
58
59 /**
60 * Priority for accelerating this image. Subclasses are free to
61 * set different default priorities and applications are free to
62 * set the priority for specific images via the
63 * <code>setAccelerationPriority(float)</code> method.
64 * @since 1.5
65 */
66 protected float accelerationPriority = .5f;
67
68 /**
|
1 /*
2 * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
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 package java.awt;
26
27 import java.awt.image.ImageProducer;
28 import java.awt.image.ImageObserver;
29 import java.awt.image.ImageFilter;
30 import java.awt.image.FilteredImageSource;
31 import java.awt.image.AreaAveragingScaleFilter;
32 import java.awt.image.ReplicateScaleFilter;
33
34 import sun.awt.image.SurfaceManager;
35
36
37 /**
38 * The abstract class <code>Image</code> is the superclass of all
39 * classes that represent graphical images. The image must be
40 * obtained in a platform-specific manner.
41 *
42 * @author Sami Shaio
43 * @author Arthur van Hoff
44 * @since JDK1.0
45 */
46 public abstract class Image {
47
48 /**
49 * convenience object; we can use this single static object for
50 * all images that do not create their own image caps; it holds the
51 * default (unaccelerated) properties.
52 */
53 private static ImageCapabilities defaultImageCaps =
54 new ImageCapabilities(false);
55
56 /**
57 * Priority for accelerating this image. Subclasses are free to
58 * set different default priorities and applications are free to
59 * set the priority for specific images via the
60 * <code>setAccelerationPriority(float)</code> method.
61 * @since 1.5
62 */
63 protected float accelerationPriority = .5f;
64
65 /**
|