public class PixelCanvas extends Object implements RenderTarget
Swing compatible drawing surface for images and graphics.
© 2002 Christian Treber, ct@ctreber.com
| Constructor and Description |
|---|
PixelCanvas(int pWidth,
int pHeight)
Construct a canvas of the specified size.
|
| Modifier and Type | Method and Description |
|---|---|
Graphics2D |
getGraphics2D() |
int |
getImageHeight() |
int |
getImageWidth() |
void |
saveToImage(OutputStream os) |
boolean |
saveToImage(String pFileName,
String pFormat) |
void |
setPixel(int pX,
int pY,
Color pColor) |
void |
setPixel(int pX,
int pY,
int pA,
int pR,
int pG,
int pB) |
public PixelCanvas(int pWidth,
int pHeight)
Construct a canvas of the specified size.
pWidth - WidthpHeight - Heightpublic Graphics2D getGraphics2D()
public void setPixel(int pX,
int pY,
int pA,
int pR,
int pG,
int pB)
setPixel in interface RenderTargetpublic void setPixel(int pX,
int pY,
Color pColor)
setPixel in interface RenderTargetpublic int getImageWidth()
getImageWidth in interface RenderTargetpublic int getImageHeight()
getImageHeight in interface RenderTargetpublic boolean saveToImage(String pFileName, String pFormat) throws IOException
IOExceptionpublic void saveToImage(OutputStream os) throws IOException
IOExceptionCopyright © 2017. All rights reserved.