author | serb |
Wed, 17 Sep 2014 16:14:12 +0400 | |
changeset 26749 | b6598aa90114 |
parent 25859 | 3317bb8137f4 |
child 35667 | ed476aba94de |
permissions | -rw-r--r-- |
539
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
1 |
/* |
23010
6dadb192ad81
8029235: Update copyright year to match last edit in jdk8 jdk repository for 2013
lana
parents:
21278
diff
changeset
|
2 |
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. |
539
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
4 |
* |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
5506 | 7 |
* published by the Free Software Foundation. Oracle designates this |
539
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
8 |
* particular file as subject to the "Classpath" exception as provided |
5506 | 9 |
* by Oracle in the LICENSE file that accompanied this code. |
539
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
10 |
* |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
15 |
* accompanied this code). |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
16 |
* |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
17 |
* You should have received a copy of the GNU General Public License version |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation, |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
20 |
* |
5506 | 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. |
|
539
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
24 |
*/ |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
25 |
|
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
26 |
/* ******************************************************************** |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
27 |
********************************************************************** |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
28 |
********************************************************************** |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
29 |
*** COPYRIGHT (c) Eastman Kodak Company, 1997 *** |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
30 |
*** As an unpublished work pursuant to Title 17 of the United *** |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
31 |
*** States Code. All rights reserved. *** |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
32 |
********************************************************************** |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
33 |
********************************************************************** |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
34 |
**********************************************************************/ |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
35 |
|
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
36 |
package java.awt.image.renderable; |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
37 |
import java.util.Vector; |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
38 |
import java.awt.RenderingHints; |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
39 |
import java.awt.image.*; |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
40 |
|
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
41 |
/** |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
42 |
* A RenderableImage is a common interface for rendering-independent |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
43 |
* images (a notion which subsumes resolution independence). That is, |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
44 |
* images which are described and have operations applied to them |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
45 |
* independent of any specific rendering of the image. For example, a |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
46 |
* RenderableImage can be rotated and cropped in |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
47 |
* resolution-independent terms. Then, it can be rendered for various |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
48 |
* specific contexts, such as a draft preview, a high-quality screen |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
49 |
* display, or a printer, each in an optimal fashion. |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
50 |
* |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
51 |
* <p> A RenderedImage is returned from a RenderableImage via the |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
52 |
* createRendering() method, which takes a RenderContext. The |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
53 |
* RenderContext specifies how the RenderedImage should be |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
54 |
* constructed. Note that it is not possible to extract pixels |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
55 |
* directly from a RenderableImage. |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
56 |
* |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
57 |
* <p> The createDefaultRendering() and createScaledRendering() methods are |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
58 |
* convenience methods that construct an appropriate RenderContext |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
59 |
* internally. All of the rendering methods may return a reference to a |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
60 |
* previously produced rendering. |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
61 |
*/ |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
62 |
public interface RenderableImage { |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
63 |
|
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
64 |
/** |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
65 |
* String constant that can be used to identify a property on |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
66 |
* a RenderedImage obtained via the createRendering or |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
67 |
* createScaledRendering methods. If such a property exists, |
21278 | 68 |
* the value of the property will be a RenderingHints object |
539
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
69 |
* specifying which hints were observed in creating the rendering. |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
70 |
*/ |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
71 |
static final String HINTS_OBSERVED = "HINTS_OBSERVED"; |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
72 |
|
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
73 |
/** |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
74 |
* Returns a vector of RenderableImages that are the sources of |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
75 |
* image data for this RenderableImage. Note that this method may |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
76 |
* return an empty vector, to indicate that the image has no sources, |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
77 |
* or null, to indicate that no information is available. |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
78 |
* |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
79 |
* @return a (possibly empty) Vector of RenderableImages, or null. |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
80 |
*/ |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
81 |
Vector<RenderableImage> getSources(); |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
82 |
|
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
83 |
/** |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
84 |
* Gets a property from the property set of this image. |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
85 |
* If the property name is not recognized, java.awt.Image.UndefinedProperty |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
86 |
* will be returned. |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
87 |
* |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
88 |
* @param name the name of the property to get, as a String. |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
89 |
* @return a reference to the property Object, or the value |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
90 |
* java.awt.Image.UndefinedProperty. |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
91 |
*/ |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
92 |
Object getProperty(String name); |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
93 |
|
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
94 |
/** |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
95 |
* Returns a list of names recognized by getProperty. |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
96 |
* @return a list of property names. |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
97 |
*/ |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
98 |
String[] getPropertyNames(); |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
99 |
|
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
100 |
/** |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
101 |
* Returns true if successive renderings (that is, calls to |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
102 |
* createRendering() or createScaledRendering()) with the same arguments |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
103 |
* may produce different results. This method may be used to |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
104 |
* determine whether an existing rendering may be cached and |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
105 |
* reused. It is always safe to return true. |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
106 |
* @return <code>true</code> if successive renderings with the |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
107 |
* same arguments might produce different results; |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
108 |
* <code>false</code> otherwise. |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
109 |
*/ |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
110 |
boolean isDynamic(); |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
111 |
|
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
112 |
/** |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
113 |
* Gets the width in user coordinate space. By convention, the |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
114 |
* usual width of a RenderableImage is equal to the image's aspect |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
115 |
* ratio (width divided by height). |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
116 |
* |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
117 |
* @return the width of the image in user coordinates. |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
118 |
*/ |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
119 |
float getWidth(); |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
120 |
|
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
121 |
/** |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
122 |
* Gets the height in user coordinate space. By convention, the |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
123 |
* usual height of a RenderedImage is equal to 1.0F. |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
124 |
* |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
125 |
* @return the height of the image in user coordinates. |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
126 |
*/ |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
127 |
float getHeight(); |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
128 |
|
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
129 |
/** |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
130 |
* Gets the minimum X coordinate of the rendering-independent image data. |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
131 |
* @return the minimum X coordinate of the rendering-independent image |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
132 |
* data. |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
133 |
*/ |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
134 |
float getMinX(); |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
135 |
|
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
136 |
/** |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
137 |
* Gets the minimum Y coordinate of the rendering-independent image data. |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
138 |
* @return the minimum Y coordinate of the rendering-independent image |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
139 |
* data. |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
140 |
*/ |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
141 |
float getMinY(); |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
142 |
|
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
143 |
/** |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
144 |
* Creates a RenderedImage instance of this image with width w, and |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
145 |
* height h in pixels. The RenderContext is built automatically |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
146 |
* with an appropriate usr2dev transform and an area of interest |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
147 |
* of the full image. All the rendering hints come from hints |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
148 |
* passed in. |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
149 |
* |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
150 |
* <p> If w == 0, it will be taken to equal |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
151 |
* Math.round(h*(getWidth()/getHeight())). |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
152 |
* Similarly, if h == 0, it will be taken to equal |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
153 |
* Math.round(w*(getHeight()/getWidth())). One of |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
154 |
* w or h must be non-zero or else an IllegalArgumentException |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
155 |
* will be thrown. |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
156 |
* |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
157 |
* <p> The created RenderedImage may have a property identified |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
158 |
* by the String HINTS_OBSERVED to indicate which RenderingHints |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
159 |
* were used to create the image. In addition any RenderedImages |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
160 |
* that are obtained via the getSources() method on the created |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
161 |
* RenderedImage may have such a property. |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
162 |
* |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
163 |
* @param w the width of rendered image in pixels, or 0. |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
164 |
* @param h the height of rendered image in pixels, or 0. |
21278 | 165 |
* @param hints a RenderingHints object containing hints. |
539
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
166 |
* @return a RenderedImage containing the rendered data. |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
167 |
*/ |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
168 |
RenderedImage createScaledRendering(int w, int h, RenderingHints hints); |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
169 |
|
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
170 |
/** |
26749 | 171 |
* Returns a RenderedImage instance of this image with a default |
539
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
172 |
* width and height in pixels. The RenderContext is built |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
173 |
* automatically with an appropriate usr2dev transform and an area |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
174 |
* of interest of the full image. The rendering hints are |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
175 |
* empty. createDefaultRendering may make use of a stored |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
176 |
* rendering for speed. |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
177 |
* |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
178 |
* @return a RenderedImage containing the rendered data. |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
179 |
*/ |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
180 |
RenderedImage createDefaultRendering(); |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
181 |
|
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
182 |
/** |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
183 |
* Creates a RenderedImage that represented a rendering of this image |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
184 |
* using a given RenderContext. This is the most general way to obtain a |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
185 |
* rendering of a RenderableImage. |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
186 |
* |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
187 |
* <p> The created RenderedImage may have a property identified |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
188 |
* by the String HINTS_OBSERVED to indicate which RenderingHints |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
189 |
* (from the RenderContext) were used to create the image. |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
190 |
* In addition any RenderedImages |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
191 |
* that are obtained via the getSources() method on the created |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
192 |
* RenderedImage may have such a property. |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
193 |
* |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
194 |
* @param renderContext the RenderContext to use to produce the rendering. |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
195 |
* @return a RenderedImage containing the rendered data. |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
196 |
*/ |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
197 |
RenderedImage createRendering(RenderContext renderContext); |
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
diff
changeset
|
198 |
} |