Class PixelCanvas
- java.lang.Object
-
- ext.plantuml.com.ctreber.acearth.gui.PixelCanvas
-
- All Implemented Interfaces:
RenderTarget
- Direct Known Subclasses:
CanvasACearth
public class PixelCanvas extends Object implements RenderTarget
Swing compatible drawing surface for images and graphics.
© 2002 Christian Treber, [email protected]
- Author:
- Christian Treber, [email protected]
-
-
Constructor Summary
Constructors Constructor Description PixelCanvas(int pWidth, int pHeight)
Construct a canvas of the specified size.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Graphics2D
getGraphics2D()
int
getImageHeight()
int
getImageWidth()
void
saveToImage(OutputStream os)
void
setPixel(int pX, int pY, int pA, int pR, int pG, int pB)
void
setPixel(int pX, int pY, Color pColor)
-
-
-
Method Detail
-
getGraphics2D
public Graphics2D getGraphics2D()
-
setPixel
public void setPixel(int pX, int pY, int pA, int pR, int pG, int pB)
- Specified by:
setPixel
in interfaceRenderTarget
-
setPixel
public void setPixel(int pX, int pY, Color pColor)
- Specified by:
setPixel
in interfaceRenderTarget
-
getImageWidth
public int getImageWidth()
- Specified by:
getImageWidth
in interfaceRenderTarget
-
getImageHeight
public int getImageHeight()
- Specified by:
getImageHeight
in interfaceRenderTarget
-
saveToImage
public void saveToImage(OutputStream os) throws IOException
- Throws:
IOException
-
-