Class ShadowGenerator

java.lang.Object
noaa.coastwatch.render.ShadowGenerator

public class ShadowGenerator extends Object
The ShadowGenerator class creates drop shadows from the non-transparent pixels in an image.
Since:
3.7.1
Author:
Peter Hollemans
  • Constructor Details

    • ShadowGenerator

      protected ShadowGenerator()
  • Method Details

    • getInstance

      public static ShadowGenerator getInstance()
    • createShadow

      public BufferedImage createShadow(BufferedImage source, int size, Color color, float alpha)
      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

      public static void main(String[] argv) throws Exception
      Throws:
      Exception