public class GraphicsBitmap
extends java.lang.Object
It took me ages slogging through the java.awt.image
javadocs to work out how to get a graphics context backed by a primitive
array buffer.
Constructor | Description |
---|---|
GraphicsBitmap(int width,
int height) |
Constructor.
|
Modifier and Type | Method | Description |
---|---|---|
void |
clear() |
Clears the bitmap.
|
java.awt.Graphics2D |
createGraphics() |
Returns a graphics context which can draw monochrome graphics on
this bitmap.
|
Pixellator |
createPixellator() |
Returns a pixellator which will iterate over the painted pixels in
this bitmap.
|
Pixellator |
createPixellator(java.awt.Rectangle bounds) |
Returns a pixellator which will iterate over a sub-region of the painted
pixels in this bitmap.
|
int |
getHeight() |
Returns the height of this bitmap.
|
int |
getWidth() |
Returns the width of this bitmap.
|
public GraphicsBitmap(int width, int height)
width
- width of the bitmapped regionheight
- height of the bitmapped regionpublic java.awt.Graphics2D createGraphics()
public void clear()
public int getWidth()
public int getHeight()
public Pixellator createPixellator()
public Pixellator createPixellator(java.awt.Rectangle bounds)
bounds
- region of space for which the pixellator is wantedCopyright © 2018 Central Laboratory of the Research Councils. All Rights Reserved.