public class FourPassImageShaper
extends java.lang.Object
Constructor and Description |
---|
FourPassImageShaper() |
Modifier and Type | Method and Description |
---|---|
static java.awt.Shape |
getShape(java.awt.image.BufferedImage image) |
static java.awt.Shape |
getShape(java.awt.image.BufferedImage image,
int max)
Given an image, possibly with a transparent background, return
the Shape of the opaque part of the image
If the image is larger than max in either direction, scale the
image down to max-by-max, do the trace (on fewer points) then
scale the resulting shape back up to the size of the original
image.
|
static java.awt.Shape |
getShape(java.awt.Image image)
Given an image, possibly with a transparent background, return
the Shape of the opaque part of the image
|
static java.awt.Shape |
getShape(java.awt.Image image,
int max) |
static java.awt.Shape |
getShape(java.lang.String fileName)
given the fileName of an image, possibly with a transparent
background, return the Shape of the opaque part of the image
|
static java.awt.Shape |
getShape(java.lang.String fileName,
int max) |
public static java.awt.Shape getShape(java.lang.String fileName)
fileName
- name of the image, loaded from the classpathpublic static java.awt.Shape getShape(java.lang.String fileName, int max)
public static java.awt.Shape getShape(java.awt.Image image)
image
- public static java.awt.Shape getShape(java.awt.Image image, int max)
public static java.awt.Shape getShape(java.awt.image.BufferedImage image, int max)
image
- the image to tracemax
- used to restrict number of points in the resulting shapepublic static java.awt.Shape getShape(java.awt.image.BufferedImage image)