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
Field Index
- o
data
-
- o
height
-
- o
width
-
Constructor Index
- o
Pixmap(Image)
- Construct a Pixmap from the given image.
- o
Pixmap(int, int)
- Construct an empty (black, opaque) Pixmap.
Method Index
- o
blendRemap(int, int)
- Remap the Pixmap to colors with the same hue between two given colors.
- o
blit(Image, int, int, int, int, int, int)
- Blit a part of an image into the Pixmap.
- o
getData()
-
- o
getHeight()
-
- o
getWidth()
-
o
data
protected int data[]
o
width
protected int width
o
height
protected int height
o
Pixmap
public Pixmap(Image image) throws AWTException, InterruptedException
- Construct a Pixmap from the given image.
- Parameters:
- img - an Image.
o
Pixmap
public Pixmap(int w,
int h)
- Construct an empty (black, opaque) Pixmap.
- Parameters:
- w - the width in pixels.
- h - the height in pixels.
o
getWidth
public int getWidth()
o
getHeight
public int getHeight()
o
getData
public int[] getData()
o
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.
o
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