public final class ShadowUtils extends Object
Modifier and Type | Method and Description |
---|---|
static BufferedImage |
createShadow(Image src,
Paint shadowPaint,
int blurRadius)
Create and return a new buffered image containing a shadow of the
specified source image using the specifed shadow paint and gaussian blur
radius.
|
public static BufferedImage createShadow(Image src, Paint shadowPaint, int blurRadius)
src.getWidth() + 4 * blurRadius
x
src.getHeight() + 4 * blurRadius
to account for blurring
beyond the bounds of the source image. Thus the source image will appear
to be be offset by (2 * blurRadius
,
2 * blurRadius
) in the returned image.src
- source image, must not be nullshadowPaint
- shadow paintblurRadius
- gaussian blur radius, must be > 0
Copyright © 1995-2012 Piccolo2D. All Rights Reserved.