public class AWTUtils extends Object
GraphicsConfiguration
and
BufferedImages
.Modifier and Type | Field and Description |
---|---|
static ColorModel |
ARGB_COLOR_MODEL |
static ColorModel |
RGB_COLOR_MODEL |
Constructor and Description |
---|
AWTUtils() |
Modifier and Type | Method and Description |
---|---|
static BufferedImage |
getBufferedImage(ARGBScreenImage screenImage)
Get a
BufferedImage for the given ARGBScreenImage . |
static BufferedImage |
getBufferedImage(ARGBScreenImage screenImage,
boolean discardAlpha)
Get a
BufferedImage for the given ARGBScreenImage . |
static GraphicsConfiguration |
getSuitableGraphicsConfiguration(ColorModel colorModel)
Get a
GraphicsConfiguration from the default screen
GraphicsDevice that matches the
transparency of the given
colorModel . |
public static final ColorModel ARGB_COLOR_MODEL
public static final ColorModel RGB_COLOR_MODEL
public static GraphicsConfiguration getSuitableGraphicsConfiguration(ColorModel colorModel)
GraphicsConfiguration
from the default screen
GraphicsDevice
that matches the
transparency
of the given
colorModel
. If no matching configuration is found, the
default configuration of the GraphicsDevice
is returned.public static BufferedImage getBufferedImage(ARGBScreenImage screenImage, boolean discardAlpha)
BufferedImage
for the given ARGBScreenImage
.screenImage
- the image.discardAlpha
- Whether to discard the screenImage
alpha
components when drawing.public static BufferedImage getBufferedImage(ARGBScreenImage screenImage)
BufferedImage
for the given ARGBScreenImage
.
Discard the screenImage
alpha components when drawing.screenImage
- the image.Copyright © 2015–2021 Fiji. All rights reserved.