fixed to match updated API canvas
authorAnton Epple <toni.epple@eppleton.de>
Wed, 12 Feb 2014 16:12:15 +0100
branchcanvas
changeset 1452716529430700
parent 1451 76859a545dd7
child 1475 36dce152ef80
fixed to match updated API
javaquery/api/src/main/java/org/apidesign/bck2brwsr/htmlpage/HTML5GraphicsEnvironment.java
     1.1 --- a/javaquery/api/src/main/java/org/apidesign/bck2brwsr/htmlpage/HTML5GraphicsEnvironment.java	Wed Feb 12 14:46:40 2014 +0100
     1.2 +++ b/javaquery/api/src/main/java/org/apidesign/bck2brwsr/htmlpage/HTML5GraphicsEnvironment.java	Wed Feb 12 16:12:15 2014 +0100
     1.3 @@ -18,6 +18,7 @@
     1.4  package org.apidesign.bck2brwsr.htmlpage;
     1.5  
     1.6  import java.util.HashMap;
     1.7 +import java.util.Map;
     1.8  import java.util.Set;
     1.9  import net.java.html.canvas.Dimension;
    1.10  import net.java.html.canvas.Image;
    1.11 @@ -207,7 +208,7 @@
    1.12                      ((RadialGradient) style).getX1(),
    1.13                      ((RadialGradient) style).getY1(),
    1.14                      ((RadialGradient) style).getR1());
    1.15 -            HashMap<Double, String> stops = ((LinearGradient) style).getStops();
    1.16 +            Map<Double, String> stops = ((LinearGradient) style).getStops();
    1.17              Set<Double> keySet = stops.keySet();
    1.18              for (Double double1 : keySet) {
    1.19                  addColorStopImpl(style, double1, stops.get(double1));
    1.20 @@ -221,7 +222,7 @@
    1.21                      ((LinearGradient) style).getY0(),
    1.22                      ((LinearGradient) style).getX1(),
    1.23                      ((LinearGradient) style).getY1());
    1.24 -            HashMap<Double, String> stops = ((LinearGradient) style).getStops();
    1.25 +            Map<Double, String> stops = ((LinearGradient) style).getStops();
    1.26              Set<Double> keySet = stops.keySet();
    1.27              for (Double double1 : keySet) {
    1.28                  addColorStopImpl(style, double1, stops.get(double1));
    1.29 @@ -376,16 +377,16 @@
    1.30      @JavaScriptBody(args = {"text", "x", "y", "maxWidth"}, body = "this._context().strokeText(text,x,y,maxWidth);")
    1.31      @Override
    1.32      public native void strokeText(String text, double x, double y, double maxWidth);
    1.33 -/*
    1.34 +
    1.35      @Override
    1.36      public ImageData createPixelMap(double x, double y) {
    1.37          return new ImageDataWrapper(createPixelMapImpl(x, y));
    1.38      }
    1.39 -*/
    1.40 +
    1.41      @JavaScriptBody(args = {"x", "y"},
    1.42              body = "return this._context().createImageData(x,y);")
    1.43      private native Object createPixelMapImpl(double x, double y);
    1.44 -/*
    1.45 +
    1.46      @Override
    1.47      public ImageData createPixelMap(ImageData imageData) {
    1.48          return new ImageDataWrapper(createPixelMapImpl(imageData.getWidth(), imageData.getHeight()));
    1.49 @@ -395,25 +396,25 @@
    1.50      public ImageData getPixelMap(double x, double y, double width, double height) {
    1.51          return new ImageDataWrapper(getPixelMapImpl(x, y, width, height));
    1.52      }
    1.53 -*/
    1.54 +    
    1.55      @JavaScriptBody(args = {"x", "y", "width", "height"},
    1.56              body = "return this._context().getImageData(x,y,width,height);")
    1.57      private native Object getPixelMapImpl(double x, double y, double width, double height);
    1.58 -/*
    1.59 +
    1.60      @Override
    1.61      public void putPixelMap(ImageData imageData, double x, double y) {
    1.62          putPixelMapImpl(((ImageDataWrapper) imageData).object(), x, y);
    1.63      }
    1.64 -*/
    1.65 +
    1.66      @JavaScriptBody(args = {"imageData", "x", "y"},
    1.67              body = "this._context().putImageData(imageData,x,y);")
    1.68      private native void putPixelMapImpl(Object imageData, double x, double y);
    1.69 -/*
    1.70 +
    1.71      @Override
    1.72      public void putPixelMap(ImageData imageData, double x, double y, double dirtyx, double dirtyy, double dirtywidth, double dirtyheight) {
    1.73          putPixelMapImpl(((ImageDataWrapper) imageData).object(), x, y, dirtyx, dirtyy, dirtywidth, dirtyheight);
    1.74      }
    1.75 -*/
    1.76 +
    1.77      @JavaScriptBody(args = {"imageData", "x", "y", "dirtyx", "dirtyy", "dirtywidth", "dirtyheight"},
    1.78              body = "this._context().putImageData(imageData,x,y, dirtyx, dirtyy, dirtywidth,dirtyheight);")
    1.79      private native void putPixelMapImpl(Object imageData, double x, double y, double dirtyx, double dirtyy, double dirtywidth, double dirtyheight);