Package com.google.gwt.canvas.dom.client
Class ImageData
java.lang.Object
com.google.gwt.core.client.JavaScriptObject
com.google.gwt.canvas.dom.client.ImageData
Object that holds image data and a size.
- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionfinal intgetAlphaAt(int x, int y) Returns the alpha value at position (x,y).final intgetBlueAt(int x, int y) Returns the blue value at position (x,y).final CanvasPixelArraygetData()Returns a canvas pixel array of size width * height * 4.final intgetGreenAt(int x, int y) Returns the green value at position (x,y).final intReturns the height of this image data object.final intgetRedAt(int x, int y) Returns the red value at position (x,y).final intgetWidth()Returns the width of this image data object.final voidsetAlphaAt(int alpha, int x, int y) Sets the alpha value at position (x,y).final voidsetBlueAt(int blue, int x, int y) Sets the blue value at position (x,y).final voidsetGreenAt(int green, int x, int y) Sets the green value at position (x,y).final voidsetRedAt(int red, int x, int y) Sets the red value at position (x,y).Methods inherited from class com.google.gwt.core.client.JavaScriptObjectcast, createArray, createArray, createFunction, createObject, equals, hashCode, toSource, toString
- 
Constructor Details- 
ImageDataprotected ImageData()
 
- 
- 
Method Details- 
getAlphaAtpublic final int getAlphaAt(int x, int y) Returns the alpha value at position (x,y).- Parameters:
- x- the x coordinate
- y- the y coordinate
- Returns:
- the alpha value at position (x,y), or 0 if not in the image
- See Also:
 
- 
getBlueAtpublic final int getBlueAt(int x, int y) Returns the blue value at position (x,y).- Parameters:
- x- the x coordinate
- y- the y coordinate
- Returns:
- the blue value at position (x,y), or 0 if not in the image
- See Also:
 
- 
getDataReturns a canvas pixel array of size width * height * 4.- Returns:
- a CanvasPixelArrayobject
 
- 
getGreenAtpublic final int getGreenAt(int x, int y) Returns the green value at position (x,y).- Parameters:
- x- the x coordinate
- y- the y coordinate
- Returns:
- the green value at position (x,y), or 0 if not in the image
- See Also:
 
- 
getHeightpublic final int getHeight()Returns the height of this image data object.- Returns:
- the image height as an int
 
- 
getRedAtpublic final int getRedAt(int x, int y) Returns the red value at position (x,y).- Parameters:
- x- the x coordinate
- y- the y coordinate
- Returns:
- the red value at position (x,y), or 0 if not in the image
- See Also:
 
- 
getWidthpublic final int getWidth()Returns the width of this image data object.- Returns:
- the image width as an int
 
- 
setAlphaAtpublic final void setAlphaAt(int alpha, int x, int y) Sets the alpha value at position (x,y).- Parameters:
- alpha- the alpha value
- x- the x coordinate
- y- the y coordinate
- See Also:
 
- 
setBlueAtpublic final void setBlueAt(int blue, int x, int y) Sets the blue value at position (x,y).- Parameters:
- blue- the blue value
- x- the x coordinate
- y- the y coordinate
- See Also:
 
- 
setGreenAtpublic final void setGreenAt(int green, int x, int y) Sets the green value at position (x,y).- Parameters:
- green- the green value
- x- the x coordinate
- y- the y coordinate
- See Also:
 
- 
setRedAtpublic final void setRedAt(int red, int x, int y) Sets the red value at position (x,y).- Parameters:
- red- the red value
- x- the x coordinate
- y- the y coordinate
- See Also:
 
 
-