ImageData (GWT Javadoc)

Overview | Package | Class | Use | Deprecated | Help
| GWT 2.7.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.google.gwt.canvas.dom.client
Class ImageData

    java.lang.Object
      com.google.gwt.core.client.JavaScriptObject
          com.google.gwt.canvas.dom.client.ImageData

    public class ImageData

extends JavaScriptObject

Object that holds image data and a size.

See Also:
  HTML Canvas 2D ImageData

Constructor Summary
`protected` | `ImageData()`

Method Summary
`int` | `getAlphaAt(int x, int y)` Returns the alpha value at position (x,y).
`int` | `getBlueAt(int x, int y)` Returns the blue value at position (x,y).
`CanvasPixelArray` | `getData()` Returns a canvas pixel array of size width * height * 4.
`int` | `getGreenAt(int x, int y)` Returns the green value at position (x,y).
`int` | `getHeight()` Returns the height of this image data object.
`int` | `getRedAt(int x, int y)` Returns the red value at position (x,y).
`int` | `getWidth()` Returns the width of this image data object.
`void` | `setAlphaAt(int alpha, int x, int y)` Sets the alpha value at position (x,y).
`void` | `setBlueAt(int blue, int x, int y)` Sets the blue value at position (x,y).
`void` | `setGreenAt(int green, int x, int y)` Sets the green value at position (x,y).
`void` | `setRedAt(int red, int x, int y)` Sets the red value at position (x,y).

Methods inherited from class com.google.gwt.core.client.JavaScriptObject
`cast, createArray, createArray, createFunction, createObject, equals, hashCode, toSource, toString`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### ImageData

    protected ImageData()

Method Detail

### getAlphaAt

    public 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:
    `setAlphaAt(int, int, int)`, `getColorAt(int, int, int)`

### getBlueAt

    public 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:
    `setBlueAt(int, int, int)`, `getColorAt(int, int, int)`

### getData

    public final CanvasPixelArray getData()

  Returns a canvas pixel array of size width * height * 4.

  Returns:
    a `CanvasPixelArray` object

### getGreenAt

    public 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:
    `setGreenAt(int, int, int)`, `getColorAt(int, int, int)`

### getHeight

    public final int getHeight()

  Returns the height of this image data object.

  Returns:
    the image height as an int

### getRedAt

    public 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:
    `setRedAt(int, int, int)`, `getColorAt(int, int, int)`

### getWidth

    public final int getWidth()

  Returns the width of this image data object.

  Returns:
    the image width as an int

### setAlphaAt

    public 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:
    `getAlphaAt(int, int)`, `getColorAt(int, int, int)`

### setBlueAt

    public 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:
    `getBlueAt(int, int)`, `getColorAt(int, int, int)`

### setGreenAt

    public 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:
    `getGreenAt(int, int)`, `getColorAt(int, int, int)`

### setRedAt

    public 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:
    `getRedAt(int, int)`, `getColorAt(int, int, int)`

Overview | Package | Class | Use | Deprecated | Help
| GWT 2.7.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD