50 /**
51 * Sets the extensible list of properties associated with this image.
52 * @param props the list of properties to be associated with this
53 * image
54 */
55 void setProperties(Hashtable<?,?> props);
56
57 /**
58 * Sets the ColorModel object used for the majority of
59 * the pixels reported using the setPixels method
60 * calls. Note that each set of pixels delivered using setPixels
61 * contains its own ColorModel object, so no assumption should
62 * be made that this model will be the only one used in delivering
63 * pixel values. A notable case where multiple ColorModel objects
64 * may be seen is a filtered image when for each set of pixels
65 * that it filters, the filter
66 * determines whether the
67 * pixels can be sent on untouched, using the original ColorModel,
68 * or whether the pixels should be modified (filtered) and passed
69 * on using a ColorModel more convenient for the filtering process.
70 * @param model the specified <code>ColorModel</code>
71 * @see ColorModel
72 */
73 void setColorModel(ColorModel model);
74
75 /**
76 * Sets the hints that the ImageConsumer uses to process the
77 * pixels delivered by the ImageProducer.
78 * The ImageProducer can deliver the pixels in any order, but
79 * the ImageConsumer may be able to scale or convert the pixels
80 * to the destination ColorModel more efficiently or with higher
81 * quality if it knows some information about how the pixels will
82 * be delivered up front. The setHints method should be called
83 * before any calls to any of the setPixels methods with a bit mask
84 * of hints about the manner in which the pixels will be delivered.
85 * If the ImageProducer does not follow the guidelines for the
86 * indicated hint, the results are undefined.
87 * @param hintflags a set of hints that the ImageConsumer uses to
88 * process the pixels
89 */
90 void setHints(int hintflags);
133 * @see #setHints
134 * @see #imageComplete
135 */
136 int SINGLEFRAME = 16;
137
138 /**
139 * Delivers the pixels of the image with one or more calls
140 * to this method. Each call specifies the location and
141 * size of the rectangle of source pixels that are contained in
142 * the array of pixels. The specified ColorModel object should
143 * be used to convert the pixels into their corresponding color
144 * and alpha components. Pixel (m,n) is stored in the pixels array
145 * at index (n * scansize + m + off). The pixels delivered using
146 * this method are all stored as bytes.
147 * @param x the X coordinate of the upper-left corner of the
148 * area of pixels to be set
149 * @param y the Y coordinate of the upper-left corner of the
150 * area of pixels to be set
151 * @param w the width of the area of pixels
152 * @param h the height of the area of pixels
153 * @param model the specified <code>ColorModel</code>
154 * @param pixels the array of pixels
155 * @param off the offset into the <code>pixels</code> array
156 * @param scansize the distance from one row of pixels to the next in
157 * the <code>pixels</code> array
158 * @see ColorModel
159 */
160 void setPixels(int x, int y, int w, int h,
161 ColorModel model, byte pixels[], int off, int scansize);
162
163 /**
164 * The pixels of the image are delivered using one or more calls
165 * to the setPixels method. Each call specifies the location and
166 * size of the rectangle of source pixels that are contained in
167 * the array of pixels. The specified ColorModel object should
168 * be used to convert the pixels into their corresponding color
169 * and alpha components. Pixel (m,n) is stored in the pixels array
170 * at index (n * scansize + m + off). The pixels delivered using
171 * this method are all stored as ints.
172 * this method are all stored as ints.
173 * @param x the X coordinate of the upper-left corner of the
174 * area of pixels to be set
175 * @param y the Y coordinate of the upper-left corner of the
176 * area of pixels to be set
177 * @param w the width of the area of pixels
178 * @param h the height of the area of pixels
179 * @param model the specified <code>ColorModel</code>
180 * @param pixels the array of pixels
181 * @param off the offset into the <code>pixels</code> array
182 * @param scansize the distance from one row of pixels to the next in
183 * the <code>pixels</code> array
184 * @see ColorModel
185 */
186 void setPixels(int x, int y, int w, int h,
187 ColorModel model, int pixels[], int off, int scansize);
188
189 /**
190 * The imageComplete method is called when the ImageProducer is
191 * finished delivering all of the pixels that the source image
192 * contains, or when a single frame of a multi-frame animation has
193 * been completed, or when an error in loading or producing the
194 * image has occurred. The ImageConsumer should remove itself from the
195 * list of consumers registered with the ImageProducer at this time,
196 * unless it is interested in successive frames.
197 * @param status the status of image loading
198 * @see ImageProducer#removeConsumer
199 */
200 void imageComplete(int status);
201
202 /**
203 * An error was encountered while producing the image.
|
50 /**
51 * Sets the extensible list of properties associated with this image.
52 * @param props the list of properties to be associated with this
53 * image
54 */
55 void setProperties(Hashtable<?,?> props);
56
57 /**
58 * Sets the ColorModel object used for the majority of
59 * the pixels reported using the setPixels method
60 * calls. Note that each set of pixels delivered using setPixels
61 * contains its own ColorModel object, so no assumption should
62 * be made that this model will be the only one used in delivering
63 * pixel values. A notable case where multiple ColorModel objects
64 * may be seen is a filtered image when for each set of pixels
65 * that it filters, the filter
66 * determines whether the
67 * pixels can be sent on untouched, using the original ColorModel,
68 * or whether the pixels should be modified (filtered) and passed
69 * on using a ColorModel more convenient for the filtering process.
70 * @param model the specified {@code ColorModel}
71 * @see ColorModel
72 */
73 void setColorModel(ColorModel model);
74
75 /**
76 * Sets the hints that the ImageConsumer uses to process the
77 * pixels delivered by the ImageProducer.
78 * The ImageProducer can deliver the pixels in any order, but
79 * the ImageConsumer may be able to scale or convert the pixels
80 * to the destination ColorModel more efficiently or with higher
81 * quality if it knows some information about how the pixels will
82 * be delivered up front. The setHints method should be called
83 * before any calls to any of the setPixels methods with a bit mask
84 * of hints about the manner in which the pixels will be delivered.
85 * If the ImageProducer does not follow the guidelines for the
86 * indicated hint, the results are undefined.
87 * @param hintflags a set of hints that the ImageConsumer uses to
88 * process the pixels
89 */
90 void setHints(int hintflags);
133 * @see #setHints
134 * @see #imageComplete
135 */
136 int SINGLEFRAME = 16;
137
138 /**
139 * Delivers the pixels of the image with one or more calls
140 * to this method. Each call specifies the location and
141 * size of the rectangle of source pixels that are contained in
142 * the array of pixels. The specified ColorModel object should
143 * be used to convert the pixels into their corresponding color
144 * and alpha components. Pixel (m,n) is stored in the pixels array
145 * at index (n * scansize + m + off). The pixels delivered using
146 * this method are all stored as bytes.
147 * @param x the X coordinate of the upper-left corner of the
148 * area of pixels to be set
149 * @param y the Y coordinate of the upper-left corner of the
150 * area of pixels to be set
151 * @param w the width of the area of pixels
152 * @param h the height of the area of pixels
153 * @param model the specified {@code ColorModel}
154 * @param pixels the array of pixels
155 * @param off the offset into the {@code pixels} array
156 * @param scansize the distance from one row of pixels to the next in
157 * the {@code pixels} array
158 * @see ColorModel
159 */
160 void setPixels(int x, int y, int w, int h,
161 ColorModel model, byte pixels[], int off, int scansize);
162
163 /**
164 * The pixels of the image are delivered using one or more calls
165 * to the setPixels method. Each call specifies the location and
166 * size of the rectangle of source pixels that are contained in
167 * the array of pixels. The specified ColorModel object should
168 * be used to convert the pixels into their corresponding color
169 * and alpha components. Pixel (m,n) is stored in the pixels array
170 * at index (n * scansize + m + off). The pixels delivered using
171 * this method are all stored as ints.
172 * this method are all stored as ints.
173 * @param x the X coordinate of the upper-left corner of the
174 * area of pixels to be set
175 * @param y the Y coordinate of the upper-left corner of the
176 * area of pixels to be set
177 * @param w the width of the area of pixels
178 * @param h the height of the area of pixels
179 * @param model the specified {@code ColorModel}
180 * @param pixels the array of pixels
181 * @param off the offset into the {@code pixels} array
182 * @param scansize the distance from one row of pixels to the next in
183 * the {@code pixels} array
184 * @see ColorModel
185 */
186 void setPixels(int x, int y, int w, int h,
187 ColorModel model, int pixels[], int off, int scansize);
188
189 /**
190 * The imageComplete method is called when the ImageProducer is
191 * finished delivering all of the pixels that the source image
192 * contains, or when a single frame of a multi-frame animation has
193 * been completed, or when an error in loading or producing the
194 * image has occurred. The ImageConsumer should remove itself from the
195 * list of consumers registered with the ImageProducer at this time,
196 * unless it is interested in successive frames.
197 * @param status the status of image loading
198 * @see ImageProducer#removeConsumer
199 */
200 void imageComplete(int status);
201
202 /**
203 * An error was encountered while producing the image.
|