Class PixelCanvas
- java.lang.Object
-
- zext.plantuml.com.ctreber.acearth.gui.PixelCanvas
-
- All Implemented Interfaces:
RenderTarget
- Direct Known Subclasses:
CanvasACearth
public class PixelCanvas extends java.lang.Object implements RenderTarget
Swing compatible drawing surface for images and graphics.
© 2002 Christian Treber, ct@ctreber.com
-
-
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 java.awt.Graphics2DgetGraphics2D()intgetImageHeight()intgetImageWidth()voidsaveToImage(java.io.OutputStream os)voidsetPixel(int pX, int pY, int pA, int pR, int pG, int pB)voidsetPixel(int pX, int pY, java.awt.Color pColor)
-
-
-
Method Detail
-
getGraphics2D
public java.awt.Graphics2D getGraphics2D()
-
setPixel
public void setPixel(int pX, int pY, int pA, int pR, int pG, int pB)- Specified by:
setPixelin interfaceRenderTarget
-
setPixel
public void setPixel(int pX, int pY, java.awt.Color pColor)- Specified by:
setPixelin interfaceRenderTarget
-
getImageWidth
public int getImageWidth()
- Specified by:
getImageWidthin interfaceRenderTarget
-
getImageHeight
public int getImageHeight()
- Specified by:
getImageHeightin interfaceRenderTarget
-
saveToImage
public void saveToImage(java.io.OutputStream os) throws java.io.IOException- Throws:
java.io.IOException
-
-