javaquery/api/src/main/java/org/apidesign/bck2brwsr/htmlpage/api/GraphicsContext.java
1.1 --- a/javaquery/api/src/main/java/org/apidesign/bck2brwsr/htmlpage/api/GraphicsContext.java Tue Jan 22 17:28:01 2013 +0100
1.2 +++ b/javaquery/api/src/main/java/org/apidesign/bck2brwsr/htmlpage/api/GraphicsContext.java Sat Jan 26 08:47:05 2013 +0100
1.3 @@ -32,7 +32,7 @@
1.4 }
1.5
1.6 @JavaScriptBody(args = {"centerx", "centery", "radius", "startangle", "endangle", "ccw"},
1.7 - body = "this.fld_context.arc(centerx,centery, radius, startangle, endangle,ccw);")
1.8 + body = "this._context().arc(centerx,centery, radius, startangle, endangle,ccw);")
1.9 public native void arc(double centerX,
1.10 double centerY,
1.11 double startAngle,
1.12 @@ -41,7 +41,7 @@
1.13 boolean ccw);
1.14
1.15 @JavaScriptBody(args = {"x1", "y1", "x2", "y2", "r"},
1.16 - body = "this.fld_context.arcTo(x1,y1,x2,y2,r);")
1.17 + body = "this._context().arcTo(x1,y1,x2,y2,r);")
1.18 public native void arcTo(double x1,
1.19 double y1,
1.20 double x2,
1.21 @@ -49,68 +49,68 @@
1.22 double r);
1.23
1.24 @JavaScriptBody(args = {"x", "y"},
1.25 - body = "return this.fld_context.isPointInPath(x,y);")
1.26 + body = "return this._context().isPointInPath(x,y);")
1.27 public native boolean isPointInPath(double x, double y);
1.28
1.29 - @JavaScriptBody(args = {}, body = "this.fld_context.fill();")
1.30 + @JavaScriptBody(args = {}, body = "this._context().fill();")
1.31 public native void fill();
1.32
1.33 - @JavaScriptBody(args = {}, body = "this.fld_context.stroke();")
1.34 + @JavaScriptBody(args = {}, body = "this._context().stroke();")
1.35 public native void stroke();
1.36
1.37 - @JavaScriptBody(args = {}, body = "this.fld_context.beginPath();")
1.38 + @JavaScriptBody(args = {}, body = "this._context().beginPath();")
1.39 public native void beginPath();
1.40
1.41 - @JavaScriptBody(args = {}, body = "this.fld_context.closePath();")
1.42 + @JavaScriptBody(args = {}, body = "this._context().closePath();")
1.43 public native void closePath();
1.44
1.45 - @JavaScriptBody(args = {}, body = "this.fld_context.clip();")
1.46 + @JavaScriptBody(args = {}, body = "this._context().clip();")
1.47 public native void clip();
1.48
1.49 - @JavaScriptBody(args = {"x", "y"}, body = "this.fld_context.moveTo(x,y);")
1.50 + @JavaScriptBody(args = {"x", "y"}, body = "this._context().moveTo(x,y);")
1.51 public native void moveTo(double x, double y);
1.52
1.53 - @JavaScriptBody(args = {"x", "y"}, body = "this.fld_context.lineTo(x,y);")
1.54 + @JavaScriptBody(args = {"x", "y"}, body = "this._context().lineTo(x,y);")
1.55 public native void lineTo(double x, double y);
1.56
1.57 - @JavaScriptBody(args = {"cpx", "cpy", "x", "y"}, body = "this.fld_context.quadraticCurveTo(cpx,cpy,x,y);")
1.58 + @JavaScriptBody(args = {"cpx", "cpy", "x", "y"}, body = "this._context().quadraticCurveTo(cpx,cpy,x,y);")
1.59 public native void quadraticCurveTo(double cpx, double cpy, double x, double y);
1.60
1.61 @JavaScriptBody(args = {"cp1x", "cp1y", "cp2x", "cp2y", "x", "y"},
1.62 - body = "this.fld_context.bezierCurveTo(cp1x,cp1y,cp2x,cp2y,x,y);")
1.63 + body = "this._context().bezierCurveTo(cp1x,cp1y,cp2x,cp2y,x,y);")
1.64 public native void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y);
1.65
1.66 - @JavaScriptBody(args = {"x", "y", "width", "height"}, body = "this.fld_context.fillRect(x,y,width,height);")
1.67 + @JavaScriptBody(args = {"x", "y", "width", "height"}, body = "this._context().fillRect(x,y,width,height);")
1.68 public native void fillRect(double x, double y, double width, double height);
1.69
1.70 - @JavaScriptBody(args = {"x", "y", "width", "height"}, body = "this.fld_context.strokeRect(x,y,width,height);")
1.71 + @JavaScriptBody(args = {"x", "y", "width", "height"}, body = "this._context().strokeRect(x,y,width,height);")
1.72 public native void strokeRect(double x, double y, double width, double height);
1.73
1.74 - @JavaScriptBody(args = {"x", "y", "width", "height"}, body = "this.fld_context.clearRect(x,y,width,height);")
1.75 + @JavaScriptBody(args = {"x", "y", "width", "height"}, body = "this._context().clearRect(x,y,width,height);")
1.76 public native void clearRect(double x, double y, double width, double height);
1.77
1.78 - @JavaScriptBody(args = {"x", "y", "width", "height"}, body = "this.fld_context.rectect(x,y,width,height);")
1.79 + @JavaScriptBody(args = {"x", "y", "width", "height"}, body = "this._context().rectect(x,y,width,height);")
1.80 public native void rect(double x, double y, double width, double height);
1.81
1.82 - @JavaScriptBody(args = {}, body = "this.fld_context.save();")
1.83 + @JavaScriptBody(args = {}, body = "this._context().save();")
1.84 public native void save();
1.85
1.86 - @JavaScriptBody(args = {}, body = "this.fld_context.restore();")
1.87 + @JavaScriptBody(args = {}, body = "this._context().restore();")
1.88 public native void restore();
1.89
1.90 - @JavaScriptBody(args = {"angle"}, body = "this.fld_context.rotate(angle);")
1.91 + @JavaScriptBody(args = {"angle"}, body = "this._context().rotate(angle);")
1.92 public native void rotate(double angle);
1.93
1.94 - @JavaScriptBody(args = {"a", "b", "c", "d", "e", "f"}, body = "this.fld_context.transform(a,b,c,d,e,f);")
1.95 + @JavaScriptBody(args = {"a", "b", "c", "d", "e", "f"}, body = "this._context().transform(a,b,c,d,e,f);")
1.96 public native void transform(double a, double b, double c, double d, double e, double f);
1.97
1.98 - @JavaScriptBody(args = {"a", "b", "c", "d", "e", "f"}, body = "this.fld_context.setTransform(a,b,c,d,e,f);")
1.99 + @JavaScriptBody(args = {"a", "b", "c", "d", "e", "f"}, body = "this._context().setTransform(a,b,c,d,e,f);")
1.100 public native void setTransform(double a, double b, double c, double d, double e, double f);
1.101
1.102 - @JavaScriptBody(args = {"x", "y"}, body = "this.fld_context.translate(x,y);")
1.103 + @JavaScriptBody(args = {"x", "y"}, body = "this._context().translate(x,y);")
1.104 public native void translate(double x, double y);
1.105
1.106 - @JavaScriptBody(args = {"x", "y"}, body = "this.fld_context.scale(x,y);")
1.107 + @JavaScriptBody(args = {"x", "y"}, body = "this._context().scale(x,y);")
1.108 public native void scale(double x, double y);
1.109
1.110 public void drawImage(Image image, double x, double y) {
1.111 @@ -134,10 +134,10 @@
1.112 @JavaScriptBody(args = {"ctx", "img", "x", "y"}, body = "ctx.drawImage(img,x,y);")
1.113 private native static void drawImageImpl(Object ctx, Object img, double x, double y);
1.114
1.115 - @JavaScriptBody(args = {"style"}, body = "this.fld_context.fillStyle=style;")
1.116 + @JavaScriptBody(args = {"style"}, body = "this._context().fillStyle=style;")
1.117 public native void setFillStyle(String style);
1.118
1.119 - @JavaScriptBody(args = {}, body = "return this.fld_context.fillStyle;")
1.120 + @JavaScriptBody(args = {}, body = "return this._context().fillStyle;")
1.121 public native String getFillStyle();
1.122
1.123 public void setFillStyle(LinearGradient style) {
1.124 @@ -155,7 +155,7 @@
1.125 @JavaScriptBody(args = {"context","obj"}, body = "context.fillStyle=obj;")
1.126 private native void setFillStyleImpl(Object context, Object obj);
1.127
1.128 - @JavaScriptBody(args = {"style"}, body = "this.fld_context.strokeStyle=style;")
1.129 + @JavaScriptBody(args = {"style"}, body = "this._context().strokeStyle=style;")
1.130 public native void setStrokeStyle(String style);
1.131
1.132 public void setStrokeStyle(LinearGradient style) {
1.133 @@ -166,7 +166,7 @@
1.134 setStrokeStyleImpl(context, style.object());
1.135 }
1.136
1.137 - @JavaScriptBody(args = {"style"}, body = "this.fld_context.fillStyle=style;")
1.138 + @JavaScriptBody(args = {"style"}, body = "this._context().fillStyle=style;")
1.139 public void setStrokeStyle(Pattern style) {
1.140 setStrokeStyleImpl(context, style.object());
1.141 }
1.142 @@ -174,79 +174,79 @@
1.143 @JavaScriptBody(args = {"context","obj"}, body = "context.strokeStyle=obj;")
1.144 private native void setStrokeStyleImpl(Object context, Object obj);
1.145
1.146 - @JavaScriptBody(args = {"color"}, body = "this.fld_context.shadowColor=color;")
1.147 + @JavaScriptBody(args = {"color"}, body = "this._context().shadowColor=color;")
1.148 public native void setShadowColor(String color);
1.149
1.150 - @JavaScriptBody(args = {"blur"}, body = "this.fld_context.shadowBlur=blur;")
1.151 + @JavaScriptBody(args = {"blur"}, body = "this._context().shadowBlur=blur;")
1.152 public native void setShadowBlur(double blur);
1.153
1.154 - @JavaScriptBody(args = {"x"}, body = "this.fld_context.shadowOffsetX=x;")
1.155 + @JavaScriptBody(args = {"x"}, body = "this._context().shadowOffsetX=x;")
1.156 public native void setShadowOffsetX(double x);
1.157
1.158 - @JavaScriptBody(args = {"y"}, body = "this.fld_context.shadowOffsetY=y;")
1.159 + @JavaScriptBody(args = {"y"}, body = "this._context().shadowOffsetY=y;")
1.160 public native void setShadowOffsetY(double y);
1.161
1.162 - @JavaScriptBody(args = {}, body = "return this.fld_context.strokeStyle;")
1.163 + @JavaScriptBody(args = {}, body = "return this._context().strokeStyle;")
1.164 public native String getStrokeStyle();
1.165
1.166 - @JavaScriptBody(args = {}, body = "return this.fld_context.shadowColor;")
1.167 + @JavaScriptBody(args = {}, body = "return this._context().shadowColor;")
1.168 public native String getShadowColor();
1.169
1.170 - @JavaScriptBody(args = {}, body = "return this.fld_context.shadowBlur;")
1.171 + @JavaScriptBody(args = {}, body = "return this._context().shadowBlur;")
1.172 public native double getShadowBlur();
1.173
1.174 - @JavaScriptBody(args = {}, body = "return this.fld_context.shadowOffsetX;")
1.175 + @JavaScriptBody(args = {}, body = "return this._context().shadowOffsetX;")
1.176 public native double getShadowOffsetX();
1.177
1.178 - @JavaScriptBody(args = {}, body = "return this.fld_context.shadowOffsetY;")
1.179 + @JavaScriptBody(args = {}, body = "return this._context().shadowOffsetY;")
1.180 public native double getShadowOffsetY();
1.181
1.182 - @JavaScriptBody(args = {}, body = "return this.fld_context.lineCap;")
1.183 + @JavaScriptBody(args = {}, body = "return this._context().lineCap;")
1.184 public native String getLineCap();
1.185
1.186 - @JavaScriptBody(args = {"style"}, body = "this.fld_context.lineCap=style;")
1.187 + @JavaScriptBody(args = {"style"}, body = "this._context().lineCap=style;")
1.188 public native void setLineCap(String style);
1.189
1.190 - @JavaScriptBody(args = {}, body = "return this.fld_context.lineJoin;")
1.191 + @JavaScriptBody(args = {}, body = "return this._context().lineJoin;")
1.192 public native String getLineJoin();
1.193
1.194 - @JavaScriptBody(args = {"style"}, body = "this.fld_context.lineJoin=style;")
1.195 + @JavaScriptBody(args = {"style"}, body = "this._context().lineJoin=style;")
1.196 public native void setLineJoin(String style) ;
1.197
1.198 - @JavaScriptBody(args = {}, body = "return this.fld_context.lineWidth;")
1.199 + @JavaScriptBody(args = {}, body = "return this._context().lineWidth;")
1.200 public native double getLineWidth();
1.201
1.202 - @JavaScriptBody(args = {"width"}, body = "this.fld_context.lineJoin=width;")
1.203 + @JavaScriptBody(args = {"width"}, body = "this._context().lineJoin=width;")
1.204 public native void setLineWidth(double width);
1.205
1.206 - @JavaScriptBody(args = {}, body = "return this.fld_context.miterLimit;")
1.207 + @JavaScriptBody(args = {}, body = "return this._context().miterLimit;")
1.208 public native double getMiterLimit();
1.209
1.210 - @JavaScriptBody(args = {"limit"}, body = "this.fld_context.miterLimit=limit;")
1.211 + @JavaScriptBody(args = {"limit"}, body = "this._context().miterLimit=limit;")
1.212 public native void setMiterLimit(double limit);
1.213
1.214 - @JavaScriptBody(args = {}, body = "return this.fld_context.font;")
1.215 + @JavaScriptBody(args = {}, body = "return this._context().font;")
1.216 public native String getFont();
1.217
1.218 - @JavaScriptBody(args = {"font"}, body = "this.fld_context.font=font;")
1.219 + @JavaScriptBody(args = {"font"}, body = "this._context().font=font;")
1.220 public native void setFont(String font);
1.221
1.222 - @JavaScriptBody(args = {}, body = "return this.fld_context.textAlign;")
1.223 + @JavaScriptBody(args = {}, body = "return this._context().textAlign;")
1.224 public native String getTextAlign();
1.225
1.226 - @JavaScriptBody(args = {"textalign"}, body = "this.fld_context.textAlign=textalign;")
1.227 + @JavaScriptBody(args = {"textalign"}, body = "this._context().textAlign=textalign;")
1.228 public native void setTextAlign(String textAlign);
1.229
1.230 - @JavaScriptBody(args = {}, body = "return this.fld_context.textBaseline;")
1.231 + @JavaScriptBody(args = {}, body = "return this._context().textBaseline;")
1.232 public native String getTextBaseline();
1.233
1.234 - @JavaScriptBody(args = {"textbaseline"}, body = "this.fld_context.textBaseline=textbaseline;")
1.235 + @JavaScriptBody(args = {"textbaseline"}, body = "this._context().textBaseline=textbaseline;")
1.236 public native void setTextBaseline(String textbaseline);
1.237
1.238 - @JavaScriptBody(args = {"text", "x", "y"}, body = "this.fld_context.fillText(text,x,y);")
1.239 + @JavaScriptBody(args = {"text", "x", "y"}, body = "this._context().fillText(text,x,y);")
1.240 public native void fillText(String text, double x, double y);
1.241
1.242 - @JavaScriptBody(args = {"text", "x", "y", "maxwidth"}, body = "this.fld_context.fillText(text,x,y,maxwidth);")
1.243 + @JavaScriptBody(args = {"text", "x", "y", "maxwidth"}, body = "this._context().fillText(text,x,y,maxwidth);")
1.244 public void fillText(String text, double x, double y, double maxWidth) {
1.245 }
1.246
1.247 @@ -255,13 +255,13 @@
1.248 }
1.249
1.250 @JavaScriptBody(args = {"text"},
1.251 - body = "return this.fld_context.measureText(text);")
1.252 + body = "return this._context().measureText(text);")
1.253 private native Object measureTextImpl(String text);
1.254
1.255 - @JavaScriptBody(args = {"text", "x", "y"}, body = "this.fld_context.strokeText(text,x,y);")
1.256 + @JavaScriptBody(args = {"text", "x", "y"}, body = "this._context().strokeText(text,x,y);")
1.257 public native void strokeText(String text, double x, double y);
1.258
1.259 - @JavaScriptBody(args = {"text", "x", "y", "maxWidth"}, body = "this.fld_context.strokeText(text,x,y,maxWidth);")
1.260 + @JavaScriptBody(args = {"text", "x", "y", "maxWidth"}, body = "this._context().strokeText(text,x,y,maxWidth);")
1.261 public native void strokeText(String text, double x, double y, double maxWidth) ;
1.262
1.263 public ImageData createImageData(double x, double y) {
1.264 @@ -269,7 +269,7 @@
1.265 }
1.266
1.267 @JavaScriptBody(args = {"x", "y"},
1.268 - body = "return this.fld_context.createImageData(x,y);")
1.269 + body = "return this._context().createImageData(x,y);")
1.270 private native Object createImageDataImpl(double x, double y);
1.271
1.272 public ImageData createImageData(ImageData imageData) {
1.273 @@ -281,7 +281,7 @@
1.274 }
1.275
1.276 @JavaScriptBody(args = {"x", "y", "width", "height"},
1.277 - body = "return this.fld_context.getImageData(x,y,width,height);")
1.278 + body = "return this._context().getImageData(x,y,width,height);")
1.279 private native Object getImageDataImpl(double x, double y, double width, double height);
1.280
1.281 public void putImageData(ImageData imageData, double x, double y) {
1.282 @@ -289,7 +289,7 @@
1.283 }
1.284
1.285 @JavaScriptBody(args = {"imageData", "x", "y"},
1.286 - body = "this.fld_context.putImageData(imageData,x,y);")
1.287 + body = "this._context().putImageData(imageData,x,y);")
1.288 private native void putImageDataImpl(Object imageData, double x, double y);
1.289
1.290 public void putImageData(ImageData imageData, double x, double y, double dirtyx, double dirtyy, double dirtywidth, double dirtyheight) {
1.291 @@ -297,19 +297,19 @@
1.292 }
1.293
1.294 @JavaScriptBody(args = {"imageData", "x", "y", "dirtyx", "dirtyy", "dirtywidth", "dirtyheight"},
1.295 - body = "this.fld_context.putImageData(imageData,x,y, dirtyx, dirtyy, dirtywidth,dirtyheight);")
1.296 + body = "this._context().putImageData(imageData,x,y, dirtyx, dirtyy, dirtywidth,dirtyheight);")
1.297 private native void putImageDataImpl(Object imageData, double x, double y, double dirtyx, double dirtyy, double dirtywidth, double dirtyheight);
1.298
1.299 - @JavaScriptBody(args = {"alpha"}, body = "this.fld_context.globalAlpha=alpha;")
1.300 + @JavaScriptBody(args = {"alpha"}, body = "this._context().globalAlpha=alpha;")
1.301 public native void setGlobalAlpha(double alpha) ;
1.302
1.303 - @JavaScriptBody(args = {}, body = "return this.fld_context.globalAlpha;")
1.304 + @JavaScriptBody(args = {}, body = "return this._context().globalAlpha;")
1.305 public native double getGlobalAlpha();
1.306
1.307 - @JavaScriptBody(args = {"operation"}, body = "this.fld_context.globalCompositeOperation=operation;")
1.308 + @JavaScriptBody(args = {"operation"}, body = "this._context().globalCompositeOperation=operation;")
1.309 public native void setGlobalCompositeOperation(double alpha);
1.310
1.311 - @JavaScriptBody(args = {}, body = "return this.fld_context.globalCompositeOperation;")
1.312 + @JavaScriptBody(args = {}, body = "return this._context().globalCompositeOperation;")
1.313 public native double getGlobalCompositeOperation();
1.314
1.315 public LinearGradient createLinearGradient(double x0, double y0, double x1, double y1) {