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 * @param source the source image
42 * @return a new image with the shadow painted in
52 * Creates a drop shadow of a given image and returns a new image which shows the input image on
58 * @param source the source image to be shadowed
63 * @return a new image with the source image on top of its shadow
72 BufferedImage image;
75 image = new BufferedImage(width + SHADOW_SIZE, height + SHADOW_SIZE,
78 Graphics2D g2 = image.createGraphics();
79 g2.drawImage(image, shadowSize, shadowSize, null);
81 int dstWidth = image.getWidth();
82 int dstHeight = image.getHeight();
98 int[] dataBuffer = ((DataBufferInt) image.getRaster().getDataBuffer()).getData();
164 return image;
169 * the given source and returns a new image with both combined
171 * @param source the source image
173 * @return the source image with a drop shadow on the bottom and right
184 BufferedImage image;
185 image = new BufferedImage(width + SHADOW_SIZE, height + SHADOW_SIZE, type);
186 Graphics2D g = image.createGraphics();
188 drawRectangleShadow(image, 0, 0, width, height);
191 return image;
196 * #SMALL_SHADOW_SIZE} around the given source and returns a new image with both combined
198 * @param source the source image
200 * @return the source image with a drop shadow on the bottom and right
212 BufferedImage image;
213 image = new BufferedImage(width + SMALL_SHADOW_SIZE, height + SMALL_SHADOW_SIZE, type);
215 Graphics2D g = image.createGraphics();
217 drawSmallRectangleShadow(image, 0, 0, width, height);
220 return image;
228 * @param image the image to draw the shadow into
234 public static void drawRectangleShadow(BufferedImage image,
236 Graphics2D gc = image.createGraphics();
249 * @param image the image to draw the shadow into
255 public static void drawSmallRectangleShadow(BufferedImage image,
257 Graphics2D gc = image.createGraphics();
363 throw new RuntimeException("Unable to load image for shadow: " + name);
368 throw new RuntimeException("Unable to load image for shadow:" + name, e);