Package edu.uci.ics.jung.visualization
Class PivotingImageShaper
- java.lang.Object
-
- edu.uci.ics.jung.visualization.PivotingImageShaper
-
public class PivotingImageShaper extends java.lang.Object
Provides factory methods that, given a BufferedImage, an Image, or the fileName of an image, will return a java.awt.Shape that is the contiguous traced outline of the opaque part of the image. This could be used to define an image for use in a Vertex, where the shape used for picking and edge-arrow placement follows the opaque part of an image that has a transparent background. The methods try to detect lines in order to minimize points in the path
-
-
Constructor Summary
Constructors Constructor Description PivotingImageShaper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description 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 imagestatic java.awt.Shape
getShape(java.awt.image.BufferedImage image)
Given an image, possibly with a transparent background, return the Shape of the opaque part of the imagestatic 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 imagestatic java.awt.Shape
getShape(java.awt.Image image, int max)
static java.awt.Shape
getShape(java.lang.String fileName)
static java.awt.Shape
getShape(java.lang.String fileName, int max)
-
-
-
Method Detail
-
getShape
public static java.awt.Shape getShape(java.lang.String fileName)
-
getShape
public static java.awt.Shape getShape(java.lang.String fileName, int max)
-
getShape
public 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- Parameters:
image
-- Returns:
- the Shape
-
getShape
public static java.awt.Shape getShape(java.awt.Image image, int max)
-
getShape
public 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- Parameters:
image
-- Returns:
- the Shape
-
getShape
public static java.awt.Shape getShape(java.awt.image.BufferedImage image)
Given an image, possibly with a transparent background, return the Shape of the opaque part of the image- Parameters:
image
-- Returns:
- the Shape
-
-