1.1 --- a/javaquery/canvas/src/main/java/net/java/html/canvas/IGraphicsContext.java Wed May 22 12:10:54 2013 +0200
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,187 +0,0 @@
1.4 -/**
1.5 - * Back 2 Browser Bytecode Translator Copyright (C) 2012 Jaroslav Tulach
1.6 - * <jaroslav.tulach@apidesign.org>
1.7 - *
1.8 - * This program is free software: you can redistribute it and/or modify it under
1.9 - * the terms of the GNU General Public License as published by the Free Software
1.10 - * Foundation, version 2 of the License.
1.11 - *
1.12 - * This program is distributed in the hope that it will be useful, but WITHOUT
1.13 - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
1.14 - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
1.15 - * details.
1.16 - *
1.17 - * You should have received a copy of the GNU General Public License along with
1.18 - * this program. Look for COPYING file in the top folder. If not, see
1.19 - * http://opensource.org/licenses/GPL-2.0.
1.20 - */
1.21 -package net.java.html.canvas;
1.22 -
1.23 -
1.24 -/**
1.25 - *
1.26 - * @author antonepple
1.27 - */
1.28 -public interface IGraphicsContext {
1.29 -
1.30 - public void arc(double centerX,
1.31 - double centerY,
1.32 - double startAngle,
1.33 - double radius,
1.34 - double endAngle,
1.35 - boolean ccw);
1.36 -
1.37 - public void arcTo(double x1,
1.38 - double y1,
1.39 - double x2,
1.40 - double y2,
1.41 - double r);
1.42 -
1.43 - public boolean isPointInPath(double x, double y);
1.44 -
1.45 - public void fill();
1.46 -
1.47 - public void stroke();
1.48 -
1.49 - public void beginPath();
1.50 -
1.51 - public void closePath();
1.52 -
1.53 - public void clip();
1.54 -
1.55 - public void moveTo(double x, double y);
1.56 -
1.57 - public void lineTo(double x, double y);
1.58 -
1.59 - public void quadraticCurveTo(double cpx, double cpy, double x, double y);
1.60 -
1.61 - public void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y);
1.62 -
1.63 - public void fillRect(double x, double y, double width, double height);
1.64 -
1.65 - public void strokeRect(double x, double y, double width, double height);
1.66 -
1.67 - public void clearRect(double x, double y, double width, double height);
1.68 -
1.69 - public void rect(double x, double y, double width, double height);
1.70 -
1.71 - public void save();
1.72 -
1.73 - public void restore();
1.74 -
1.75 - public void rotate(double angle);
1.76 -
1.77 - public void transform(double a, double b, double c, double d, double e, double f);
1.78 -
1.79 - public void setTransform(double a, double b, double c, double d, double e, double f);
1.80 -
1.81 - public void translate(double x, double y);
1.82 -
1.83 - public void scale(double x, double y);
1.84 -
1.85 - public void drawImage(IImage image, double x, double y);
1.86 -
1.87 - public void drawImage(IImage image, double x, double y, double width, double height);
1.88 -
1.89 - public void drawImage(IImage image, double sx, double sy, double sWidth, double sHeight, double x, double y, double width, double height);
1.90 -
1.91 - public void setFillStyle(String style);
1.92 -
1.93 - public String getFillStyle();
1.94 -
1.95 - public void setFillStyle(ILinearGradient style);
1.96 -
1.97 - public void setFillStyle(IRadialGradient style);
1.98 -
1.99 - public void setFillStyle(IPattern style);
1.100 -
1.101 - public void setStrokeStyle(String style);
1.102 -
1.103 - public void setStrokeStyle(ILinearGradient style);
1.104 -
1.105 - public void setStrokeStyle(IRadialGradient style);
1.106 -
1.107 - public void setStrokeStyle(IPattern style);
1.108 -
1.109 - public void setShadowColor(String color);
1.110 -
1.111 - public void setShadowBlur(double blur);
1.112 -
1.113 - public void setShadowOffsetX(double x);
1.114 -
1.115 - public void setShadowOffsetY(double y);
1.116 -
1.117 - public String getStrokeStyle();
1.118 -
1.119 - public String getShadowColor();
1.120 -
1.121 - public double getShadowBlur();
1.122 -
1.123 - public double getShadowOffsetX();
1.124 -
1.125 - public double getShadowOffsetY();
1.126 -
1.127 - public String getLineCap();
1.128 -
1.129 - public void setLineCap(String style);
1.130 -
1.131 - public String getLineJoin();
1.132 -
1.133 - public void setLineJoin(String style);
1.134 -
1.135 - public double getLineWidth();
1.136 -
1.137 - public void setLineWidth(double width);
1.138 -
1.139 - public double getMiterLimit();
1.140 -
1.141 - public void setMiterLimit(double limit);
1.142 -
1.143 - public String getFont();
1.144 -
1.145 - public void setFont(String font);
1.146 -
1.147 - public String getTextAlign();
1.148 -
1.149 - public void setTextAlign(String textAlign);
1.150 -
1.151 - public String getTextBaseline();
1.152 -
1.153 - public void setTextBaseline(String textbaseline);
1.154 -
1.155 - public void fillText(String text, double x, double y);
1.156 -
1.157 - public void fillText(String text, double x, double y, double maxWidth);
1.158 -
1.159 - public ITextMetrics measureText(String text);
1.160 -
1.161 - public void strokeText(String text, double x, double y);
1.162 -
1.163 - public void strokeText(String text, double x, double y, double maxWidth);
1.164 -
1.165 - public IImageData createImageData(double x, double y);
1.166 -
1.167 - public IImageData createImageData(IImageData imageData);
1.168 -
1.169 - public IImageData getImageData(double x, double y, double width, double height);
1.170 -
1.171 - public void putImageData(IImageData imageData, double x, double y);
1.172 -
1.173 - public void putImageData(IImageData imageData, double x, double y, double dirtyx, double dirtyy, double dirtywidth, double dirtyheight);
1.174 -
1.175 - public void setGlobalAlpha(double alpha);
1.176 -
1.177 - public double getGlobalAlpha();
1.178 -
1.179 - public void setGlobalCompositeOperation(String operation);
1.180 -
1.181 - public String getGlobalCompositeOperation();
1.182 -
1.183 - public ILinearGradient createLinearGradient(double x0, double y0, double x1, double y1);
1.184 -
1.185 - public IPattern createPattern(IImage image, String repeat);
1.186 -
1.187 - public IRadialGradient createRadialGradient(double x0, double y0, double r0, double x1, double y1, double r1);
1.188 -
1.189 - public IImage getImageForPath(String path);
1.190 -}