Class AWTImage
- java.lang.Object
-
- nl.colorize.multimedialib.renderer.java2d.AWTImage
-
-
Constructor Summary
Constructors Constructor Description AWTImage(java.awt.image.BufferedImage image)AWTImage(java.awt.image.BufferedImage image, FilePointer origin)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImageextractRegion(Rect region)Returns a newImageinstance that is based on the same source image, but only contains the specified rectangular region within the source image.intgetAlpha(int x, int y)Returns the alpha of a pixel within the image.ColorRGBgetColor(int x, int y)Returns the RGB color value of a pixel within the image.intgetHeight()java.awt.image.BufferedImagegetImage()RectgetRegion()intgetWidth()java.lang.StringtoString()
-
-
-
Constructor Detail
-
AWTImage
public AWTImage(java.awt.image.BufferedImage image, FilePointer origin)
-
AWTImage
public AWTImage(java.awt.image.BufferedImage image)
-
-
Method Detail
-
getImage
public java.awt.image.BufferedImage getImage()
-
extractRegion
public Image extractRegion(Rect region)
Description copied from interface:ImageReturns a newImageinstance that is based on the same source image, but only contains the specified rectangular region within the source image.- Specified by:
extractRegionin interfaceImage
-
getColor
public ColorRGB getColor(int x, int y)
Description copied from interface:ImageReturns the RGB color value of a pixel within the image. This does not include the pixel's alpha value even if the image does support transparency. The alpha value can be retrieved separately usingImage.getAlpha(int, int).
-
getAlpha
public int getAlpha(int x, int y)Description copied from interface:ImageReturns the alpha of a pixel within the image. The returned value is between 0 (fully transparent) and 100 (fully opaque).
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-