Lines Matching refs:image

23 import java.awt.image.BufferedImage;
24 import java.awt.image.DataBufferInt;
33 * Adds a drop shadow to a semi-transparent image (of an arbitrary shape) and returns it as a
34 * new image. This method attempts to mimic the same visual characteristics as the rectangular
35 * shadow painting methods in this class, {@link #createRectangularDropShadow(java.awt.image.BufferedImage)}
36 * and {@link #createSmallRectangularDropShadow(java.awt.image.BufferedImage)}.
38 * If shadowSize is less or equals to 1, no shadow will be painted and the source image will be
41 * @param source the source image
45 * @return an image with the shadow painted in or the source image if shadowSize <= 1
55 * Creates a drop shadow of a given image and returns a new image which shows the input image on
61 * @param source the source image to be shadowed
66 * @return a new image with the source image on top of its shadow when shadowSize > 0 or the
67 * source image otherwise
79 BufferedImage image;
82 image = new BufferedImage(width + SHADOW_SIZE, height + SHADOW_SIZE,
85 Graphics2D g2 = image.createGraphics();
86 g2.drawImage(image, shadowSize, shadowSize, null);
88 int dstWidth = image.getWidth();
89 int dstHeight = image.getHeight();
105 int[] dataBuffer = ((DataBufferInt) image.getRaster().getDataBuffer()).getData();
171 return image;
176 * the given source and returns a new image with both combined
178 * @param source the source image
180 * @return the source image with a drop shadow on the bottom and right
191 BufferedImage image;
192 image = new BufferedImage(width + SHADOW_SIZE, height + SHADOW_SIZE, type);
193 Graphics2D g = image.createGraphics();
195 drawRectangleShadow(image, 0, 0, width, height);
198 return image;
203 * #SMALL_SHADOW_SIZE} around the given source and returns a new image with both combined
205 * @param source the source image
207 * @return the source image with a drop shadow on the bottom and right
219 BufferedImage image;
220 image = new BufferedImage(width + SMALL_SHADOW_SIZE, height + SMALL_SHADOW_SIZE, type);
222 Graphics2D g = image.createGraphics();
224 drawSmallRectangleShadow(image, 0, 0, width, height);
227 return image;
235 * @param image the image to draw the shadow into
241 public static void drawRectangleShadow(BufferedImage image,
243 Graphics2D gc = image.createGraphics();
256 * @param image the image to draw the shadow into
262 public static void drawSmallRectangleShadow(BufferedImage image,
264 Graphics2D gc = image.createGraphics();
370 throw new RuntimeException("Unable to load image for shadow: " + name);
375 throw new RuntimeException("Unable to load image for shadow:" + name, e);