# HG changeset patch # User Anton Epple # Date 1392217935 -3600 # Node ID 716529430700dbdeb9ab19cd552037fd1ad689ee # Parent 76859a545dd758384e01e1df72c14bd4b93429c4 fixed to match updated API diff -r 76859a545dd7 -r 716529430700 javaquery/api/src/main/java/org/apidesign/bck2brwsr/htmlpage/HTML5GraphicsEnvironment.java --- a/javaquery/api/src/main/java/org/apidesign/bck2brwsr/htmlpage/HTML5GraphicsEnvironment.java Wed Feb 12 14:46:40 2014 +0100 +++ b/javaquery/api/src/main/java/org/apidesign/bck2brwsr/htmlpage/HTML5GraphicsEnvironment.java Wed Feb 12 16:12:15 2014 +0100 @@ -18,6 +18,7 @@ package org.apidesign.bck2brwsr.htmlpage; import java.util.HashMap; +import java.util.Map; import java.util.Set; import net.java.html.canvas.Dimension; import net.java.html.canvas.Image; @@ -207,7 +208,7 @@ ((RadialGradient) style).getX1(), ((RadialGradient) style).getY1(), ((RadialGradient) style).getR1()); - HashMap stops = ((LinearGradient) style).getStops(); + Map stops = ((LinearGradient) style).getStops(); Set keySet = stops.keySet(); for (Double double1 : keySet) { addColorStopImpl(style, double1, stops.get(double1)); @@ -221,7 +222,7 @@ ((LinearGradient) style).getY0(), ((LinearGradient) style).getX1(), ((LinearGradient) style).getY1()); - HashMap stops = ((LinearGradient) style).getStops(); + Map stops = ((LinearGradient) style).getStops(); Set keySet = stops.keySet(); for (Double double1 : keySet) { addColorStopImpl(style, double1, stops.get(double1)); @@ -376,16 +377,16 @@ @JavaScriptBody(args = {"text", "x", "y", "maxWidth"}, body = "this._context().strokeText(text,x,y,maxWidth);") @Override public native void strokeText(String text, double x, double y, double maxWidth); -/* + @Override public ImageData createPixelMap(double x, double y) { return new ImageDataWrapper(createPixelMapImpl(x, y)); } -*/ + @JavaScriptBody(args = {"x", "y"}, body = "return this._context().createImageData(x,y);") private native Object createPixelMapImpl(double x, double y); -/* + @Override public ImageData createPixelMap(ImageData imageData) { return new ImageDataWrapper(createPixelMapImpl(imageData.getWidth(), imageData.getHeight())); @@ -395,25 +396,25 @@ public ImageData getPixelMap(double x, double y, double width, double height) { return new ImageDataWrapper(getPixelMapImpl(x, y, width, height)); } -*/ + @JavaScriptBody(args = {"x", "y", "width", "height"}, body = "return this._context().getImageData(x,y,width,height);") private native Object getPixelMapImpl(double x, double y, double width, double height); -/* + @Override public void putPixelMap(ImageData imageData, double x, double y) { putPixelMapImpl(((ImageDataWrapper) imageData).object(), x, y); } -*/ + @JavaScriptBody(args = {"imageData", "x", "y"}, body = "this._context().putImageData(imageData,x,y);") private native void putPixelMapImpl(Object imageData, double x, double y); -/* + @Override public void putPixelMap(ImageData imageData, double x, double y, double dirtyx, double dirtyy, double dirtywidth, double dirtyheight) { putPixelMapImpl(((ImageDataWrapper) imageData).object(), x, y, dirtyx, dirtyy, dirtywidth, dirtyheight); } -*/ + @JavaScriptBody(args = {"imageData", "x", "y", "dirtyx", "dirtyy", "dirtywidth", "dirtyheight"}, body = "this._context().putImageData(imageData,x,y, dirtyx, dirtyy, dirtywidth,dirtyheight);") private native void putPixelMapImpl(Object imageData, double x, double y, double dirtyx, double dirtyy, double dirtywidth, double dirtyheight);