ext.plantuml.com.ctreber.acearth.gui
Class PixelCanvas
- java.lang.Object
-
- ext.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 and 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 and Description java.awt.Graphics2DgetGraphics2D()intgetImageHeight()intgetImageWidth()voidsaveToImage(java.io.OutputStream os)booleansaveToImage(java.lang.String pFileName, java.lang.String pFormat)voidsetPixel(int pX, int pY, java.awt.Color pColor)voidsetPixel(int pX, int pY, int pA, int pR, int pG, int pB)
-
-
-
Constructor Detail
-
PixelCanvas
public PixelCanvas(int pWidth, int pHeight)Construct a canvas of the specified size.
- Parameters:
pWidth- WidthpHeight- Height
-
-
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 boolean saveToImage(java.lang.String pFileName, java.lang.String pFormat) throws java.io.IOException- Throws:
java.io.IOException
-
saveToImage
public void saveToImage(java.io.OutputStream os) throws java.io.IOException- Throws:
java.io.IOException
-
-
DataMelt 3.0 © DataMelt by jWork.ORG