de.javasoft.util.java2d
Class Synthetica2DUtils

java.lang.Object
  extended by de.javasoft.util.java2d.Synthetica2DUtils

public class Synthetica2DUtils
extends java.lang.Object

Helpful Java2D methods.

Version:
1.06, 14.02.2013

Constructor Summary
Synthetica2DUtils()
           
 
Method Summary
static void colorizeImage(java.awt.image.BufferedImage src, java.awt.image.BufferedImage dest, java.awt.Color color, float alpha)
          Colorizes an image and returns the tinted image through the given destination image.
static java.awt.image.BufferedImage createAlphaImage(java.awt.image.BufferedImage src, float alpha)
          Adds translucency to a given image.
static java.awt.image.ConvolveOp createBlurOp(int size)
          Creates a ConvolveOp which can be used for blurring images.
static java.awt.image.BufferedImage createBlurredImage(java.awt.image.BufferedImage src, int size)
          Creates a blurred image.
static java.awt.image.BufferedImage createColorizedImage(java.awt.image.BufferedImage src, java.awt.Color color, float alpha)
          Creates a tinted image.
static java.awt.Image flipHorizontal(java.awt.Image image)
          Flip image horizontal.
static java.awt.Image flipVertical(java.awt.Image image)
          Flip image vertical.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Synthetica2DUtils

public Synthetica2DUtils()
Method Detail

createBlurredImage

public static java.awt.image.BufferedImage createBlurredImage(java.awt.image.BufferedImage src,
                                                              int size)
Creates a blurred image.

Parameters:
src - Source image.
size - Blur size (higher values can cause high utilization)
Returns:
Blurred image.

createBlurOp

public static java.awt.image.ConvolveOp createBlurOp(int size)
Creates a ConvolveOp which can be used for blurring images.

Parameters:
size - Blur size (higher values can cause high utilization)
Returns:
ConvolveOp.
See Also:
ConvolveOp

createAlphaImage

public static java.awt.image.BufferedImage createAlphaImage(java.awt.image.BufferedImage src,
                                                            float alpha)
Adds translucency to a given image.

Parameters:
src - Source image.
alpha - Alpha value between 0.0f and 1.0f. Lower value means more translucent.
Returns:
Translucent image.

createColorizedImage

public static java.awt.image.BufferedImage createColorizedImage(java.awt.image.BufferedImage src,
                                                                java.awt.Color color,
                                                                float alpha)
Creates a tinted image.

Parameters:
src - Source image.
color - Color used for tinting.
alpha - Tinting value between 0.0f and 1.0f. Higher value means more tinting.
Returns:
Tinted image.

colorizeImage

public static void colorizeImage(java.awt.image.BufferedImage src,
                                 java.awt.image.BufferedImage dest,
                                 java.awt.Color color,
                                 float alpha)
Colorizes an image and returns the tinted image through the given destination image.

Parameters:
src - Source image.
dest - Destination image.
color - Color used for tinting.
alpha - Tinting value between 0.0f and 1.0f. Higher value means more tinting.

flipHorizontal

public static java.awt.Image flipHorizontal(java.awt.Image image)
Flip image horizontal.

Parameters:
image - Source image.
Returns:
Flipped image.

flipVertical

public static java.awt.Image flipVertical(java.awt.Image image)
Flip image vertical.

Parameters:
image - Source image.
Returns:
Flipped image.


Copyright © 2004-2011 Jyloo Software. All Rights Reserved.