public class ImageBuilder
extends java.lang.Object
Constructor and Description |
---|
ImageBuilder(int width,
int height,
boolean hasAlpha)
Construct an ImageBuilder instance
|
Modifier and Type | Method and Description |
---|---|
java.awt.image.BufferedImage |
getBufferedImage()
Create a BufferedImage using the data stored in the ImageBuilder.
|
int |
getHeight()
Get the height of the ImageBuilder pixel field
|
int |
getRGB(int x,
int y)
Get the RGB or ARGB value for the pixel at the position (x,y)
within the image builder pixel field.
|
java.awt.image.BufferedImage |
getSubimage(int x,
int y,
int w,
int h)
Gets a subimage from the ImageBuilder using the specified parameters.
|
int |
getWidth()
Get the width of the ImageBuilder pixel field
|
void |
setRGB(int x,
int y,
int argb)
Set the RGB or ARGB value for the pixel at position (x,y)
within the image builder pixel field.
|
public ImageBuilder(int width, int height, boolean hasAlpha)
width
- the width of the image to be builtheight
- the height of the image to be builthasAlpha
- indicates whether the image has an alpha channel
(the selection of alpha channel does not change the memory
requirements for the ImageBuilder or resulting BufferedImage.public int getWidth()
public int getHeight()
public int getRGB(int x, int y)
x
- the X coordinate of the pixel to be ready
- the Y coordinate of the pixel to be readpublic void setRGB(int x, int y, int argb)
x
- the X coordinate of the pixel to be sety
- the Y coordinate of the pixel to be setargb
- the RGB or ARGB value to be stored.public java.awt.image.BufferedImage getBufferedImage()
public java.awt.image.BufferedImage getSubimage(int x, int y, int w, int h)
x
- the X coordinate of the upper-left corner of the
specified rectangular regiony
- the Y coordinate of the upper-left corner of the
specified rectangular regionw
- the width of the specified rectangular regionh
- the height of the specified rectangular regionjava.awt.image.RasterFormatException
- f the specified area is not contained
within this ImageBuilder"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"