forked from XWxiaowei/JavaCode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathImageCapabilities.java
More file actions
81 lines (73 loc) · 1.83 KB
/
ImageCapabilities.java
File metadata and controls
81 lines (73 loc) · 1.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
/*
* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package java.awt;
/**
* Capabilities and properties of images.
* @author Michael Martak
* @since 1.4
*/
public class ImageCapabilities implements Cloneable {
private boolean accelerated = false;
/**
* Creates a new object for specifying image capabilities.
* @param accelerated whether or not an accelerated image is desired
*/
public ImageCapabilities(boolean accelerated) {
this.accelerated = accelerated;
}
/**
* Returns <code>true</code> if the object whose capabilities are
* encapsulated in this <code>ImageCapabilities</code> can be or is
* accelerated.
* @return whether or not an image can be, or is, accelerated. There are
* various platform-specific ways to accelerate an image, including
* pixmaps, VRAM, AGP. This is the general acceleration method (as
* opposed to residing in system memory).
*/
public boolean isAccelerated() {
return accelerated;
}
/**
* Returns <code>true</code> if the <code>VolatileImage</code>
* described by this <code>ImageCapabilities</code> can lose
* its surfaces.
* @return whether or not a volatile image is subject to losing its surfaces
* at the whim of the operating system.
*/
public boolean isTrueVolatile() {
return false;
}
/**
* @return a copy of this ImageCapabilities object.
*/
public Object clone() {
try {
return super.clone();
} catch (CloneNotSupportedException e) {
// Since we implement Cloneable, this should never happen
throw new InternalError(e);
}
}
}