All Packages Class Hierarchy This Package Previous Next Index
Class novocode.netforge.util.Pixmap
java.lang.Object
|
+----novocode.netforge.util.Pixmap
- public class Pixmap
- extends Object
A pixmap contains 32bit (R+G+B+Alpha) image data
-
data
-
-
height
-
-
width
-
-
Pixmap(Image)
- Construct a Pixmap from the given image.
-
Pixmap(int, int)
- Construct an empty (black, opaque) Pixmap.
-
blendRemap(int, int)
- Remap the Pixmap to colors with the same hue between two given colors.
-
blit(Image, int, int, int, int, int, int)
- Blit a part of an image into the Pixmap.
-
getData()
-
-
getHeight()
-
-
getWidth()
-
data
protected int data[]
width
protected int width
height
protected int height
Pixmap
public Pixmap(Image image) throws AWTException, InterruptedException
- Construct a Pixmap from the given image.
- Parameters:
- img - an Image.
Pixmap
public Pixmap(int w,
int h)
- Construct an empty (black, opaque) Pixmap.
- Parameters:
- w - the width in pixels.
- h - the height in pixels.
getWidth
public int getWidth()
getHeight
public int getHeight()
getData
public int[] getData()
blit
public void blit(Image image,
int x,
int y,
int w,
int h,
int dx,
int dy) throws AWTException, InterruptedException
- Blit a part of an image into the Pixmap.
Alpha channels are ignored for this operation.
- Parameters:
- image - an Image.
- x - the left edge of the block in the given image.
- y - the top edge of the block in the given image.
- w - the width of the block in pixels.
- h - the height of the block in pixels.
- dx - the left edge of the destination area in the Pixmap.
- dy - the top edge of the destination area in the Pixmap.
blendRemap
public void blendRemap(int bg,
int fg)
- Remap the Pixmap to colors with the same hue between two given colors.
This method sets the alpha channel to opaque for all pixels.
- Parameters:
- bg - the RGB color to which black is remapped.
- fg - the RGB color to which white is remapped.
All Packages Class Hierarchy This Package Previous Next Index