- java.lang.Object
-
- bdv.util.AWTUtils
-
public class AWTUtils extends Object
Static helper methods for setting upGraphicsConfigurationandBufferedImages.- Author:
- Tobias Pietzsch
-
-
Field Summary
Fields Modifier and Type Field Description static ColorModelARGB_COLOR_MODELstatic ColorModelRGB_COLOR_MODEL
-
Constructor Summary
Constructors Constructor Description AWTUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static BufferedImagegetBufferedImage(net.imglib2.display.screenimage.awt.ARGBScreenImage screenImage)Get aBufferedImagefor the givenARGBScreenImage.static BufferedImagegetBufferedImage(net.imglib2.display.screenimage.awt.ARGBScreenImage screenImage, boolean discardAlpha)Get aBufferedImagefor the givenARGBScreenImage.static GraphicsConfigurationgetSuitableGraphicsConfiguration(ColorModel colorModel)Get aGraphicsConfigurationfrom the default screenGraphicsDevicethat matches thetransparencyof the givencolorModel.
-
-
-
Field Detail
-
ARGB_COLOR_MODEL
public static final ColorModel ARGB_COLOR_MODEL
-
RGB_COLOR_MODEL
public static final ColorModel RGB_COLOR_MODEL
-
-
Method Detail
-
getSuitableGraphicsConfiguration
public static GraphicsConfiguration getSuitableGraphicsConfiguration(ColorModel colorModel)
Get aGraphicsConfigurationfrom the default screenGraphicsDevicethat matches thetransparencyof the givencolorModel. If no matching configuration is found, the default configuration of theGraphicsDeviceis returned.
-
getBufferedImage
public static BufferedImage getBufferedImage(net.imglib2.display.screenimage.awt.ARGBScreenImage screenImage, boolean discardAlpha)
Get aBufferedImagefor the givenARGBScreenImage.- Parameters:
screenImage- the image.discardAlpha- Whether to discard thescreenImagealpha components when drawing.
-
getBufferedImage
public static BufferedImage getBufferedImage(net.imglib2.display.screenimage.awt.ARGBScreenImage screenImage)
Get aBufferedImagefor the givenARGBScreenImage. Discard thescreenImagealpha components when drawing.- Parameters:
screenImage- the image.
-
-