Lines Matching defs:image

28 import java.awt.image.*;
35 * <li>Invoke <code>paint</code> when you want to paint the image,
39 * <li>Override <code>paintToImage</code> to render the image. The code that
48 * draw the image yourself. This is primarly useful when you are not
82 * Renders the cached image to the the passed in <code>Graphic</code>.
83 * If there is no cached image <code>paintToImage</code> will be invoked.
84 * <code>paintImage</code> is invoked to paint the cached image.
121 Image image = cache.getImage(key, config, w, h, args);
125 if (image instanceof VolatileImage) {
126 // See if we need to recreate the image
127 switch (((VolatileImage)image).validate(config)) {
129 ((VolatileImage)image).flush();
130 image = null;
137 if (image == null) {
138 // Recreate the image
139 image = createImage(c, w, h, config, args);
140 cache.setImage(key, config, w, h, args, image);
145 Graphics g2 = image.getGraphics();
146 paintToImage(c, image, g2, w, h, args);
151 paintImage(c, g, x, y, w, h, image, args);
156 } while ((image instanceof VolatileImage) &&
157 ((VolatileImage)image).contentsLost() && ++attempts < 3);
164 * @param image Image to paint to
170 protected abstract void paintToImage(Component c, Image image, Graphics g,
175 * Paints the image to the specified location.
183 * @param image Image to paint
187 int x, int y, int w, int h, Image image,
189 g.drawImage(image, x, y, null);
193 * Creates the image to cache. This returns an opaque image, subclasses
198 * @param w Width of image to create
199 * @param h Height to image to create
213 * Clear the image cache