public class CGraphicUtils extends Object
Constructor and Description |
---|
CGraphicUtils() |
Modifier and Type | Method and Description |
---|---|
static BufferedImage |
addPhotoBorder(BufferedImage src,
int outer,
int inner,
Color colOuter,
Color colInner)
Adds a two colored border to the given image.
|
static BufferedImage |
CreateThumb(BufferedImage img,
int thumbSize)
Creates a thumb of the specified image with the given thumb size.
|
static BufferedImage |
getScaledInstance(BufferedImage img,
int destw,
int desth,
Object hint)
Gets a scaled instance of the source image.
|
static Shape |
MergeClipShapes(Shape destination,
Shape currentClip)
Merges the specified shapes.
|
public static BufferedImage getScaledInstance(BufferedImage img, int destw, int desth, Object hint)
img
- destw
- Target width, -1 if width should be in correct aspect ratio to target height.desth
- Target height, -1 if height should be in correct aspect ratio to target width.hint
- See RenderingHints.VALUE_INTERPOLATION_XXXpublic static BufferedImage addPhotoBorder(BufferedImage src, int outer, int inner, Color colOuter, Color colInner)
src
- outer
- inner
- colOuter
- colInner
- public static BufferedImage CreateThumb(BufferedImage img, int thumbSize)
img
- thumbSize
-