edu.umd.cs.piccolox.util
Class ShadowUtils

java.lang.Object
  extended by edu.umd.cs.piccolox.util.ShadowUtils

public final class ShadowUtils
extends Object

Static utility methods for creating shadows.

Since:
1.3

Method Summary
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createShadow

public 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. The dimensions of the returned image will be 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.

Parameters:
src - source image, must not be null
shadowPaint - shadow paint
blurRadius - gaussian blur radius, must be > 0
Returns:
a new buffered image containing a shadow of the specified source image using the specifed shadow paint and gaussian blur radius


Copyright © 1995-2010 Piccolo2D. All Rights Reserved.