Package noaa.coastwatch.render
Class ShadowGenerator
java.lang.Object
noaa.coastwatch.render.ShadowGenerator
The
ShadowGenerator
class creates drop shadows from the
non-transparent pixels in an image.- Since:
- 3.7.1
- Author:
- Peter Hollemans
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateShadow
(BufferedImage source, int size, Color color, float alpha) Creates a new shadow image from the pixels of a source image.static ShadowGenerator
static void
-
Constructor Details
-
ShadowGenerator
protected ShadowGenerator()
-
-
Method Details
-
getInstance
-
createShadow
Creates a new shadow image from the pixels of a source image.- Parameters:
source
- the source image to use.size
- the size of the shadow blur in pixels.color
- the color of the shadow.alpha
- the alpha transparency- Returns:
- the shadow image. The shadow is centered in the image, and a border of 2*size pixels added on all sides. The total size is 4*size pixels larger in each dimension than the source image.
-
main
- Throws:
Exception
-