Package gwt.g2d.client.graphics.canvas

Examples of gwt.g2d.client.graphics.canvas.ImageDataAdapter


   * @param width
   * @param height
   * @return a new ImageData object.
   */
  public ImageDataAdapter createImageData(int width, int height) {
    return new ImageDataAdapter(context.createImageData(width, height)
        .<ImageData>cast());
  }
View Full Code Here


   *
   * @param imageData
   * @return a new ImageData object.
   */
  public ImageDataAdapter createImageData(ImageDataAdapter imageData) {
    return new ImageDataAdapter(context.createImageData(imageData.getImageData()));
  }
View Full Code Here

   * @param width
   * @param height
   */
  public ImageDataAdapter getImageData(double x, double y, double width,
      double height) {
    return new ImageDataAdapter(context.getImageData(x, y, width, height));
  }
View Full Code Here

      @Override
      public void onSuccess(ImageElementResource resource) {
        ImageElement image = resource.getImage();
        getPrimarySurface().drawImage(image, 0, 0);
       
        ImageDataAdapter imageData = getPrimarySurface()
            .getImageData(0, 0, image.getWidth(), image.getHeight());
        for (int r = 0; r < image.getWidth(); r++) {
          for (int c = 0; c < image.getHeight(); c++) {
            Color color = imageData.getColor(r, c);
            imageData.setColor(r, c, new Color(
                255 - color.getR(),
                255 - color.getG(),
                255 - color.getB()));
          }
        }
View Full Code Here

TOP

Related Classes of gwt.g2d.client.graphics.canvas.ImageDataAdapter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.