standup.utils
Class GraphicsUtils
java.lang.Object
standup.utils.GraphicsUtils
public class GraphicsUtils
- extends Object
Provides various static
methods for dealing with
BufferedImage
s, i.e. scaling, handling transparency, etc.
Some of them are used by the SymbolRenderer
s.
- Author:
- Ruli Manurung
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
cachedGraphicsConfiguration
private static GraphicsConfiguration cachedGraphicsConfiguration
GraphicsUtils
public GraphicsUtils()
makeColorTransparent
public static Image makeColorTransparent(Image im,
Color color)
toBufferedImage
public static BufferedImage toBufferedImage(Image image)
hasAlpha
public static boolean hasAlpha(Image image)
copy
public static BufferedImage copy(BufferedImage source,
BufferedImage target)
getScaledInstance
public static BufferedImage getScaledInstance(BufferedImage image,
int width,
int height)
getScaledInstanceByHeight
public static BufferedImage getScaledInstanceByHeight(BufferedImage image,
int height)
getDefaultConfiguration
public static GraphicsConfiguration getDefaultConfiguration()
toCompatibleImage
public static BufferedImage toCompatibleImage(BufferedImage image,
GraphicsConfiguration gc)