# HG changeset patch # User Anton Epple # Date 1369233471 -7200 # Node ID 2dc980517b3613abbf67fb08c1a023c843631b3c # Parent 39b095abcc68c147d301a30a45e9babf2dffed24 Simplified and separated Provider and Client API diff -r 39b095abcc68 -r 2dc980517b36 javaquery/canvas/src/main/java/net/java/html/canvas/GraphicsContext.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/javaquery/canvas/src/main/java/net/java/html/canvas/GraphicsContext.java Wed May 22 16:37:51 2013 +0200 @@ -0,0 +1,346 @@ +/** + * Back 2 Browser Bytecode Translator Copyright (C) 2012 Jaroslav Tulach + * + * + * This program is free software: you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation, version 2 of the License. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License along with + * this program. Look for COPYING file in the top folder. If not, see + * http://opensource.org/licenses/GPL-2.0. + */ +package net.java.html.canvas; + +import java.awt.Dimension; + +/** + * + * @author antonepple + */ +public final class GraphicsContext { + + GraphicsEnvironment graphicsEnvironmentImpl; + + public GraphicsContext(GraphicsEnvironment graphicsEnvironment) { + this.graphicsEnvironmentImpl = graphicsEnvironment; + } + + public void arc(double centerX, + double centerY, + double startAngle, + double radius, + double endAngle, + boolean ccw) { + graphicsEnvironmentImpl.arc(centerX, centerY, startAngle, radius, endAngle, ccw); + } + + public void arcTo(double x1, + double y1, + double x2, + double y2, + double r) { + graphicsEnvironmentImpl.arcTo(x1, y1, x2, y2, r); + } + + public boolean isPointInPath(double x, double y) { + return graphicsEnvironmentImpl.isPointInPath(x, y); + } + + public void fill() { + graphicsEnvironmentImpl.fill(); + } + + public void stroke() { + graphicsEnvironmentImpl.stroke(); + } + + public void beginPath() { + graphicsEnvironmentImpl.beginPath(); + } + + public void closePath(){ + graphicsEnvironmentImpl.closePath(); + } + + public void clip(){ + graphicsEnvironmentImpl.clip(); + } + + public void moveTo(double x, double y){ + graphicsEnvironmentImpl.moveTo(x, y); + } + + public void lineTo(double x, double y){ + graphicsEnvironmentImpl.lineTo(x, y); + } + + public void quadraticCurveTo(double cpx, double cpy, double x, double y){ + graphicsEnvironmentImpl.quadraticCurveTo(cpx, cpy, x, y); + } + + public void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y){ + graphicsEnvironmentImpl.bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y); + } + + public void fillRect(double x, double y, double width, double height){ + graphicsEnvironmentImpl.fillRect(x, y, width, height); + } + + public void strokeRect(double x, double y, double width, double height){ + graphicsEnvironmentImpl.strokeRect(x, y, width, height); + } + + public void clearRect(double x, double y, double width, double height){ + graphicsEnvironmentImpl.clearRect(x, y, width, height); + } + + public void rect(double x, double y, double width, double height){ + graphicsEnvironmentImpl.rect(x, y, width, height); + } + + public void save(){ + graphicsEnvironmentImpl.save(); + } + + public void restore(){ + graphicsEnvironmentImpl.restore(); + } + + public void rotate(double angle){ + graphicsEnvironmentImpl.rotate(angle); + } + + public void transform(double a, double b, double c, double d, double e, double f){ + graphicsEnvironmentImpl.transform(a, b, c, d, e, f); + } + + public void setTransform(double a, double b, double c, double d, double e, double f){ + graphicsEnvironmentImpl.setTransform(a, b, c, d, e, f); + } + + public void translate(double x, double y){ + graphicsEnvironmentImpl.translate(x, y); + } + + public void scale(double x, double y){ + graphicsEnvironmentImpl.scale(x, y); + } + + public void drawImage(ImageData image, double x, double y){ + graphicsEnvironmentImpl.drawImage(image, x, y); + } + + public void drawImage(ImageData image, double x, double y, double width, double height){ + graphicsEnvironmentImpl.drawImage(image, x, y, width, height); + } + + public void drawImage(ImageData image, double sx, double sy, double sWidth, double sHeight, double x, double y, double width, double height){ + graphicsEnvironmentImpl.drawImage(image, sx, sy, sWidth, sHeight, x, y, width, height); + } + + public void setFillStyle(String style){ + graphicsEnvironmentImpl.setFillStyle(style); + } + + public String getFillStyle(){ + return graphicsEnvironmentImpl.getFillStyle(); + } + + public void setFillStyle(Pattern style){ + graphicsEnvironmentImpl.setFillStyle(style); + } + + public void setStrokeStyle(String style){ + graphicsEnvironmentImpl.setStrokeStyle(style); + } + + public void setStrokeStyle(Pattern style){ + graphicsEnvironmentImpl.setStrokeStyle(style); + } + + public void setShadowColor(String color){ + graphicsEnvironmentImpl.setShadowColor(color); + } + + public void setShadowBlur(double blur){ + graphicsEnvironmentImpl.setShadowBlur(blur); + } + + public void setShadowOffsetX(double x){ + graphicsEnvironmentImpl.setShadowOffsetX(x); + } + + public void setShadowOffsetY(double y){ + graphicsEnvironmentImpl.setShadowOffsetY(y); + } + + public String getStrokeStyle(){ + return graphicsEnvironmentImpl.getStrokeStyle(); + } + + public String getShadowColor(){ + return graphicsEnvironmentImpl.getShadowColor(); + } + + public double getShadowBlur(){ + return graphicsEnvironmentImpl.getShadowBlur(); + } + + public double getShadowOffsetX(){ + return graphicsEnvironmentImpl.getShadowOffsetX(); + } + + public double getShadowOffsetY(){ + return graphicsEnvironmentImpl.getShadowOffsetY(); + } + + public String getLineCap(){ + return graphicsEnvironmentImpl.getLineCap(); + } + + public void setLineCap(String style){ + graphicsEnvironmentImpl.setLineCap(style); + } + + public String getLineJoin(){ + return graphicsEnvironmentImpl.getLineJoin(); + } + + public void setLineJoin(String style){ + graphicsEnvironmentImpl.setLineJoin(style); + } + + public double getLineWidth(){ + return graphicsEnvironmentImpl.getLineWidth(); + } + + public void setLineWidth(double width){ + graphicsEnvironmentImpl.setLineWidth(width); + } + + public double getMiterLimit(){ + return graphicsEnvironmentImpl.getMiterLimit(); + } + + public void setMiterLimit(double limit){ + graphicsEnvironmentImpl.setMiterLimit(limit); + } + + public String getFont(){ + return graphicsEnvironmentImpl.getFont(); + } + + public void setFont(String font){ + graphicsEnvironmentImpl.setFont(font); + } + + public String getTextAlign(){ + return graphicsEnvironmentImpl.getTextAlign(); + } + + public void setTextAlign(String textAlign){ + graphicsEnvironmentImpl.setTextAlign(textAlign); + } + + public String getTextBaseline(){ + return graphicsEnvironmentImpl.getTextBaseline(); + } + + public void setTextBaseline(String textbaseline){ + graphicsEnvironmentImpl.setTextBaseline(textbaseline); + } + + public void fillText(String text, double x, double y){ + graphicsEnvironmentImpl.fillText(text, x, y); + } + + public void fillText(String text, double x, double y, double maxWidth){ + graphicsEnvironmentImpl.fillText(text, x, y, maxWidth); + } + + public Dimension measureText(String text){ + return graphicsEnvironmentImpl.measureText(text); + } + + public void strokeText(String text, double x, double y){ + graphicsEnvironmentImpl.strokeText(text, x, y); + } + + public void strokeText(String text, double x, double y, double maxWidth){ + graphicsEnvironmentImpl.strokeText(text, x, y, maxWidth); + } + + public ImageData createImageData(double x, double y){ + return graphicsEnvironmentImpl.createImageData(x, y); + } + + public ImageData createImageData(ImageData imageData){ + return graphicsEnvironmentImpl.createImageData(imageData); + } + + public ImageData getImageData(double x, double y, double width, double height){ + return graphicsEnvironmentImpl.getImageData(x, y, width, height); + } + + public void putImageData(ImageData imageData, double x, double y){ + graphicsEnvironmentImpl.putImageData(imageData, x, y); + } + + public void putImageData(ImageData imageData, double x, double y, double dirtyx, double dirtyy, double dirtywidth, double dirtyheight){ + graphicsEnvironmentImpl.putImageData(imageData, x, y, dirtyx, dirtyy, dirtywidth, dirtyheight); + } + + public void setGlobalAlpha(double alpha){ + graphicsEnvironmentImpl.setGlobalAlpha(alpha); + } + + public double getGlobalAlpha(){ + return graphicsEnvironmentImpl.getGlobalAlpha(); + } + + public void setGlobalCompositeOperation(String operation){ + graphicsEnvironmentImpl.setGlobalCompositeOperation(operation); + } + + public String getGlobalCompositeOperation(){ + return graphicsEnvironmentImpl.getGlobalCompositeOperation(); + } + + public LinearGradient createLinearGradient(double x0, double y0, double x1, double y1){ + return graphicsEnvironmentImpl.createLinearGradient(x0, y0, x1, y1); + } + + public Pattern createPattern(ImageData image, String repeat){ + return graphicsEnvironmentImpl.createPattern(image, repeat); + } + + public RadialGradient createRadialGradient(double x0, double y0, double r0, double x1, double y1, double r1){ + return graphicsEnvironmentImpl.createRadialGradient(x0, y0, r0, x1, y1, r1); + } + + public ImageData getImageForPath(String path){ + return graphicsEnvironmentImpl.getImageForPath(path); + } + + public int getHeight(){ + return graphicsEnvironmentImpl.getHeight(); + } + + public int getWidth(){ + return graphicsEnvironmentImpl.getWidth(); + } + + public void setHeight(int height){ + graphicsEnvironmentImpl.setHeight(height); + } + + public void setWidth(int width){ + graphicsEnvironmentImpl.setWidth(width); + } +} diff -r 39b095abcc68 -r 2dc980517b36 javaquery/canvas/src/main/java/net/java/html/canvas/GraphicsEnvironment.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/javaquery/canvas/src/main/java/net/java/html/canvas/GraphicsEnvironment.java Wed May 22 16:37:51 2013 +0200 @@ -0,0 +1,175 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package net.java.html.canvas; + +import java.awt.Dimension; + +/** + * + * @author antonepple + */ +public interface GraphicsEnvironment { + public void arc(double centerX, + double centerY, + double startAngle, + double radius, + double endAngle, + boolean ccw); + + public void arcTo(double x1, + double y1, + double x2, + double y2, + double r); + + public boolean isPointInPath(double x, double y); + + public void fill(); + + public void stroke(); + + public void beginPath(); + + public void closePath(); + + public void clip(); + + public void moveTo(double x, double y); + + public void lineTo(double x, double y); + + public void quadraticCurveTo(double cpx, double cpy, double x, double y); + + public void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); + + public void fillRect(double x, double y, double width, double height); + + public void strokeRect(double x, double y, double width, double height); + + public void clearRect(double x, double y, double width, double height); + + public void rect(double x, double y, double width, double height); + + public void save(); + + public void restore(); + + public void rotate(double angle); + + public void transform(double a, double b, double c, double d, double e, double f); + + public void setTransform(double a, double b, double c, double d, double e, double f); + + public void translate(double x, double y); + + public void scale(double x, double y); + + public void drawImage(ImageData image, double x, double y); + + public void drawImage(ImageData image, double x, double y, double width, double height); + + public void drawImage(ImageData image, double sx, double sy, double sWidth, double sHeight, double x, double y, double width, double height); + + public void setFillStyle(String style); + + public String getFillStyle(); + + public void setFillStyle(Pattern style); + + public void setStrokeStyle(String style); + + public void setStrokeStyle(Pattern style); + + public void setShadowColor(String color); + + public void setShadowBlur(double blur); + + public void setShadowOffsetX(double x); + + public void setShadowOffsetY(double y); + + public String getStrokeStyle(); + + public String getShadowColor(); + + public double getShadowBlur(); + + public double getShadowOffsetX(); + + public double getShadowOffsetY(); + + public String getLineCap(); + + public void setLineCap(String style); + + public String getLineJoin(); + + public void setLineJoin(String style); + + public double getLineWidth(); + + public void setLineWidth(double width); + + public double getMiterLimit(); + + public void setMiterLimit(double limit); + + public String getFont(); + + public void setFont(String font); + + public String getTextAlign(); + + public void setTextAlign(String textAlign); + + public String getTextBaseline(); + + public void setTextBaseline(String textbaseline); + + public void fillText(String text, double x, double y); + + public void fillText(String text, double x, double y, double maxWidth); + + public Dimension measureText(String text); + + public void strokeText(String text, double x, double y); + + public void strokeText(String text, double x, double y, double maxWidth); + + public ImageData createImageData(double x, double y); + + public ImageData createImageData(ImageData imageData); + + public ImageData getImageData(double x, double y, double width, double height); + + public void putImageData(ImageData imageData, double x, double y); + + public void putImageData(ImageData imageData, double x, double y, double dirtyx, double dirtyy, double dirtywidth, double dirtyheight); + + public void setGlobalAlpha(double alpha); + + public double getGlobalAlpha(); + + public void setGlobalCompositeOperation(String operation); + + public String getGlobalCompositeOperation(); + + public LinearGradient createLinearGradient(double x0, double y0, double x1, double y1); + + public Pattern createPattern(ImageData image, String repeat); + + public RadialGradient createRadialGradient(double x0, double y0, double r0, double x1, double y1, double r1); + + public ImageData getImageForPath(String path); + + public int getHeight(); + + public int getWidth(); + + public void setHeight(int height); + + public void setWidth(int width); + +} diff -r 39b095abcc68 -r 2dc980517b36 javaquery/canvas/src/main/java/net/java/html/canvas/ICanvas.java --- a/javaquery/canvas/src/main/java/net/java/html/canvas/ICanvas.java Wed May 22 12:10:54 2013 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,37 +0,0 @@ -/** - * Back 2 Browser Bytecode Translator Copyright (C) 2012 Jaroslav Tulach - * - * - * This program is free software: you can redistribute it and/or modify it under - * the terms of the GNU General Public License as published by the Free Software - * Foundation, version 2 of the License. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more - * details. - * - * You should have received a copy of the GNU General Public License along with - * this program. Look for COPYING file in the top folder. If not, see - * http://opensource.org/licenses/GPL-2.0. - */ -package net.java.html.canvas; - - -/** - * - * @author antonepple - */ -public interface ICanvas { - - IGraphicsContext getContext(); - - int getHeight(); - - int getWidth(); - - void setHeight(int height); - - void setWidth(int width); - -} diff -r 39b095abcc68 -r 2dc980517b36 javaquery/canvas/src/main/java/net/java/html/canvas/IGraphicsContext.java --- a/javaquery/canvas/src/main/java/net/java/html/canvas/IGraphicsContext.java Wed May 22 12:10:54 2013 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,187 +0,0 @@ -/** - * Back 2 Browser Bytecode Translator Copyright (C) 2012 Jaroslav Tulach - * - * - * This program is free software: you can redistribute it and/or modify it under - * the terms of the GNU General Public License as published by the Free Software - * Foundation, version 2 of the License. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more - * details. - * - * You should have received a copy of the GNU General Public License along with - * this program. Look for COPYING file in the top folder. If not, see - * http://opensource.org/licenses/GPL-2.0. - */ -package net.java.html.canvas; - - -/** - * - * @author antonepple - */ -public interface IGraphicsContext { - - public void arc(double centerX, - double centerY, - double startAngle, - double radius, - double endAngle, - boolean ccw); - - public void arcTo(double x1, - double y1, - double x2, - double y2, - double r); - - public boolean isPointInPath(double x, double y); - - public void fill(); - - public void stroke(); - - public void beginPath(); - - public void closePath(); - - public void clip(); - - public void moveTo(double x, double y); - - public void lineTo(double x, double y); - - public void quadraticCurveTo(double cpx, double cpy, double x, double y); - - public void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); - - public void fillRect(double x, double y, double width, double height); - - public void strokeRect(double x, double y, double width, double height); - - public void clearRect(double x, double y, double width, double height); - - public void rect(double x, double y, double width, double height); - - public void save(); - - public void restore(); - - public void rotate(double angle); - - public void transform(double a, double b, double c, double d, double e, double f); - - public void setTransform(double a, double b, double c, double d, double e, double f); - - public void translate(double x, double y); - - public void scale(double x, double y); - - public void drawImage(IImage image, double x, double y); - - public void drawImage(IImage image, double x, double y, double width, double height); - - public void drawImage(IImage image, double sx, double sy, double sWidth, double sHeight, double x, double y, double width, double height); - - public void setFillStyle(String style); - - public String getFillStyle(); - - public void setFillStyle(ILinearGradient style); - - public void setFillStyle(IRadialGradient style); - - public void setFillStyle(IPattern style); - - public void setStrokeStyle(String style); - - public void setStrokeStyle(ILinearGradient style); - - public void setStrokeStyle(IRadialGradient style); - - public void setStrokeStyle(IPattern style); - - public void setShadowColor(String color); - - public void setShadowBlur(double blur); - - public void setShadowOffsetX(double x); - - public void setShadowOffsetY(double y); - - public String getStrokeStyle(); - - public String getShadowColor(); - - public double getShadowBlur(); - - public double getShadowOffsetX(); - - public double getShadowOffsetY(); - - public String getLineCap(); - - public void setLineCap(String style); - - public String getLineJoin(); - - public void setLineJoin(String style); - - public double getLineWidth(); - - public void setLineWidth(double width); - - public double getMiterLimit(); - - public void setMiterLimit(double limit); - - public String getFont(); - - public void setFont(String font); - - public String getTextAlign(); - - public void setTextAlign(String textAlign); - - public String getTextBaseline(); - - public void setTextBaseline(String textbaseline); - - public void fillText(String text, double x, double y); - - public void fillText(String text, double x, double y, double maxWidth); - - public ITextMetrics measureText(String text); - - public void strokeText(String text, double x, double y); - - public void strokeText(String text, double x, double y, double maxWidth); - - public IImageData createImageData(double x, double y); - - public IImageData createImageData(IImageData imageData); - - public IImageData getImageData(double x, double y, double width, double height); - - public void putImageData(IImageData imageData, double x, double y); - - public void putImageData(IImageData imageData, double x, double y, double dirtyx, double dirtyy, double dirtywidth, double dirtyheight); - - public void setGlobalAlpha(double alpha); - - public double getGlobalAlpha(); - - public void setGlobalCompositeOperation(String operation); - - public String getGlobalCompositeOperation(); - - public ILinearGradient createLinearGradient(double x0, double y0, double x1, double y1); - - public IPattern createPattern(IImage image, String repeat); - - public IRadialGradient createRadialGradient(double x0, double y0, double r0, double x1, double y1, double r1); - - public IImage getImageForPath(String path); -} diff -r 39b095abcc68 -r 2dc980517b36 javaquery/canvas/src/main/java/net/java/html/canvas/IImage.java --- a/javaquery/canvas/src/main/java/net/java/html/canvas/IImage.java Wed May 22 12:10:54 2013 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -/** - * Back 2 Browser Bytecode Translator Copyright (C) 2012 Jaroslav Tulach - * - * - * This program is free software: you can redistribute it and/or modify it under - * the terms of the GNU General Public License as published by the Free Software - * Foundation, version 2 of the License. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more - * details. - * - * You should have received a copy of the GNU General Public License along with - * this program. Look for COPYING file in the top folder. If not, see - * http://opensource.org/licenses/GPL-2.0. - */ -package net.java.html.canvas; - -/** - * - * @author antonepple - */ -public interface IImage { - - - public int getHeight(); - - public int getWidth(); - - -} diff -r 39b095abcc68 -r 2dc980517b36 javaquery/canvas/src/main/java/net/java/html/canvas/IImageData.java --- a/javaquery/canvas/src/main/java/net/java/html/canvas/IImageData.java Wed May 22 12:10:54 2013 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -/** - * Back 2 Browser Bytecode Translator Copyright (C) 2012 Jaroslav Tulach - * - * - * This program is free software: you can redistribute it and/or modify it under - * the terms of the GNU General Public License as published by the Free Software - * Foundation, version 2 of the License. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more - * details. - * - * You should have received a copy of the GNU General Public License along with - * this program. Look for COPYING file in the top folder. If not, see - * http://opensource.org/licenses/GPL-2.0. - */ -package net.java.html.canvas; - - - -/** - * - * @author antonepple - */ -public interface IImageData { - - public double getHeight(); - - public double getWidth(); - -} diff -r 39b095abcc68 -r 2dc980517b36 javaquery/canvas/src/main/java/net/java/html/canvas/ILinearGradient.java --- a/javaquery/canvas/src/main/java/net/java/html/canvas/ILinearGradient.java Wed May 22 12:10:54 2013 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,28 +0,0 @@ -/** - * Back 2 Browser Bytecode Translator Copyright (C) 2012 Jaroslav Tulach - * - * - * This program is free software: you can redistribute it and/or modify it under - * the terms of the GNU General Public License as published by the Free Software - * Foundation, version 2 of the License. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more - * details. - * - * You should have received a copy of the GNU General Public License along with - * this program. Look for COPYING file in the top folder. If not, see - * http://opensource.org/licenses/GPL-2.0. - */ -package net.java.html.canvas; - -/** - * - * @author antonepple - */ -public interface ILinearGradient { - - void addColorStop(double position, String color); - -} diff -r 39b095abcc68 -r 2dc980517b36 javaquery/canvas/src/main/java/net/java/html/canvas/IPattern.java --- a/javaquery/canvas/src/main/java/net/java/html/canvas/IPattern.java Wed May 22 12:10:54 2013 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,26 +0,0 @@ -/** - * Back 2 Browser Bytecode Translator Copyright (C) 2012 Jaroslav Tulach - * - * - * This program is free software: you can redistribute it and/or modify it under - * the terms of the GNU General Public License as published by the Free Software - * Foundation, version 2 of the License. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more - * details. - * - * You should have received a copy of the GNU General Public License along with - * this program. Look for COPYING file in the top folder. If not, see - * http://opensource.org/licenses/GPL-2.0. - */ -package net.java.html.canvas; - -/** - * - * @author antonepple - */ -public interface IPattern { - -} diff -r 39b095abcc68 -r 2dc980517b36 javaquery/canvas/src/main/java/net/java/html/canvas/IRadialGradient.java --- a/javaquery/canvas/src/main/java/net/java/html/canvas/IRadialGradient.java Wed May 22 12:10:54 2013 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,28 +0,0 @@ -/** - * Back 2 Browser Bytecode Translator Copyright (C) 2012 Jaroslav Tulach - * - * - * This program is free software: you can redistribute it and/or modify it under - * the terms of the GNU General Public License as published by the Free Software - * Foundation, version 2 of the License. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more - * details. - * - * You should have received a copy of the GNU General Public License along with - * this program. Look for COPYING file in the top folder. If not, see - * http://opensource.org/licenses/GPL-2.0. - */ -package net.java.html.canvas; - -/** - * - * @author antonepple - */ -public interface IRadialGradient { - - void addColorStop(double position, String color); - -} diff -r 39b095abcc68 -r 2dc980517b36 javaquery/canvas/src/main/java/net/java/html/canvas/ITextMetrics.java --- a/javaquery/canvas/src/main/java/net/java/html/canvas/ITextMetrics.java Wed May 22 12:10:54 2013 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -/** - * Back 2 Browser Bytecode Translator Copyright (C) 2012 Jaroslav Tulach - * - * - * This program is free software: you can redistribute it and/or modify it under - * the terms of the GNU General Public License as published by the Free Software - * Foundation, version 2 of the License. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more - * details. - * - * You should have received a copy of the GNU General Public License along with - * this program. Look for COPYING file in the top folder. If not, see - * http://opensource.org/licenses/GPL-2.0. - */ -package net.java.html.canvas; - -/** - * - * @author antonepple - */ -public interface ITextMetrics { - - double getHeight(); - - double getWidth(); - -} diff -r 39b095abcc68 -r 2dc980517b36 javaquery/canvas/src/main/java/net/java/html/canvas/ImageData.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/javaquery/canvas/src/main/java/net/java/html/canvas/ImageData.java Wed May 22 16:37:51 2013 +0200 @@ -0,0 +1,36 @@ +/** + * Back 2 Browser Bytecode Translator Copyright (C) 2012 Jaroslav Tulach + * + * + * This program is free software: you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation, version 2 of the License. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License along with + * this program. Look for COPYING file in the top folder. If not, see + * http://opensource.org/licenses/GPL-2.0. + */ +package net.java.html.canvas; + + + +/** + * + * @author antonepple + */ +public interface ImageData { + + public double getHeight(); + + public double getWidth(); + + public int getValueAt(double x, double y); + + public void setValueAt(double x, double y, int value); + +} diff -r 39b095abcc68 -r 2dc980517b36 javaquery/canvas/src/main/java/net/java/html/canvas/LinearGradient.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/javaquery/canvas/src/main/java/net/java/html/canvas/LinearGradient.java Wed May 22 16:37:51 2013 +0200 @@ -0,0 +1,28 @@ +/** + * Back 2 Browser Bytecode Translator Copyright (C) 2012 Jaroslav Tulach + * + * + * This program is free software: you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation, version 2 of the License. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License along with + * this program. Look for COPYING file in the top folder. If not, see + * http://opensource.org/licenses/GPL-2.0. + */ +package net.java.html.canvas; + +/** + * + * @author antonepple + */ +public interface LinearGradient extends Pattern{ + + void addColorStop(double position, String color); + +} diff -r 39b095abcc68 -r 2dc980517b36 javaquery/canvas/src/main/java/net/java/html/canvas/Pattern.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/javaquery/canvas/src/main/java/net/java/html/canvas/Pattern.java Wed May 22 16:37:51 2013 +0200 @@ -0,0 +1,26 @@ +/** + * Back 2 Browser Bytecode Translator Copyright (C) 2012 Jaroslav Tulach + * + * + * This program is free software: you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation, version 2 of the License. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License along with + * this program. Look for COPYING file in the top folder. If not, see + * http://opensource.org/licenses/GPL-2.0. + */ +package net.java.html.canvas; + +/** + * + * @author antonepple + */ +public interface Pattern { + +} diff -r 39b095abcc68 -r 2dc980517b36 javaquery/canvas/src/main/java/net/java/html/canvas/RadialGradient.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/javaquery/canvas/src/main/java/net/java/html/canvas/RadialGradient.java Wed May 22 16:37:51 2013 +0200 @@ -0,0 +1,28 @@ +/** + * Back 2 Browser Bytecode Translator Copyright (C) 2012 Jaroslav Tulach + * + * + * This program is free software: you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation, version 2 of the License. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License along with + * this program. Look for COPYING file in the top folder. If not, see + * http://opensource.org/licenses/GPL-2.0. + */ +package net.java.html.canvas; + +/** + * + * @author antonepple + */ +public interface RadialGradient extends LinearGradient{ + + void addColorStop(double position, String color); + +}