javaquery/canvas/src/main/java/net/java/html/canvas/GraphicsEnvironment.java
branchcanvas
changeset 1128 2dc980517b36
child 1129 425c0c9ff88c
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/javaquery/canvas/src/main/java/net/java/html/canvas/GraphicsEnvironment.java	Wed May 22 16:37:51 2013 +0200
     1.3 @@ -0,0 +1,175 @@
     1.4 +/*
     1.5 + * To change this template, choose Tools | Templates
     1.6 + * and open the template in the editor.
     1.7 + */
     1.8 +package net.java.html.canvas;
     1.9 +
    1.10 +import java.awt.Dimension;
    1.11 +
    1.12 +/**
    1.13 + *
    1.14 + * @author antonepple
    1.15 + */
    1.16 +public interface GraphicsEnvironment {
    1.17 +    public void arc(double centerX,
    1.18 +            double centerY,
    1.19 +            double startAngle,
    1.20 +            double radius,
    1.21 +            double endAngle,
    1.22 +            boolean ccw);
    1.23 +
    1.24 +    public void arcTo(double x1,
    1.25 +            double y1,
    1.26 +            double x2,
    1.27 +            double y2,
    1.28 +            double r);
    1.29 +
    1.30 +    public boolean isPointInPath(double x, double y);
    1.31 +
    1.32 +    public void fill();
    1.33 +
    1.34 +    public void stroke();
    1.35 +
    1.36 +    public void beginPath();
    1.37 +
    1.38 +    public void closePath();
    1.39 +
    1.40 +    public void clip();
    1.41 +
    1.42 +    public void moveTo(double x, double y);
    1.43 +
    1.44 +    public void lineTo(double x, double y);
    1.45 +
    1.46 +    public void quadraticCurveTo(double cpx, double cpy, double x, double y);
    1.47 +
    1.48 +    public void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y);
    1.49 +
    1.50 +    public void fillRect(double x, double y, double width, double height);
    1.51 +
    1.52 +    public void strokeRect(double x, double y, double width, double height);
    1.53 +
    1.54 +    public void clearRect(double x, double y, double width, double height);
    1.55 +
    1.56 +    public void rect(double x, double y, double width, double height);
    1.57 +
    1.58 +    public void save();
    1.59 +
    1.60 +    public void restore();
    1.61 +
    1.62 +    public void rotate(double angle);
    1.63 +
    1.64 +    public void transform(double a, double b, double c, double d, double e, double f);
    1.65 +
    1.66 +    public void setTransform(double a, double b, double c, double d, double e, double f);
    1.67 +
    1.68 +    public void translate(double x, double y);
    1.69 +
    1.70 +    public void scale(double x, double y);
    1.71 +
    1.72 +    public void drawImage(ImageData image, double x, double y);
    1.73 +
    1.74 +    public void drawImage(ImageData image, double x, double y, double width, double height);
    1.75 +
    1.76 +    public void drawImage(ImageData image, double sx, double sy, double sWidth, double sHeight, double x, double y, double width, double height);
    1.77 +
    1.78 +    public void setFillStyle(String style);
    1.79 +
    1.80 +    public String getFillStyle();
    1.81 +
    1.82 +    public void setFillStyle(Pattern style);
    1.83 +
    1.84 +    public void setStrokeStyle(String style);
    1.85 +
    1.86 +    public void setStrokeStyle(Pattern style);
    1.87 +
    1.88 +    public void setShadowColor(String color);
    1.89 +
    1.90 +    public void setShadowBlur(double blur);
    1.91 +
    1.92 +    public void setShadowOffsetX(double x);
    1.93 +
    1.94 +    public void setShadowOffsetY(double y);
    1.95 +
    1.96 +    public String getStrokeStyle();
    1.97 +
    1.98 +    public String getShadowColor();
    1.99 +
   1.100 +    public double getShadowBlur();
   1.101 +
   1.102 +    public double getShadowOffsetX();
   1.103 +
   1.104 +    public double getShadowOffsetY();
   1.105 +
   1.106 +    public String getLineCap();
   1.107 +
   1.108 +    public void setLineCap(String style);
   1.109 +
   1.110 +    public String getLineJoin();
   1.111 +
   1.112 +    public void setLineJoin(String style);
   1.113 +
   1.114 +    public double getLineWidth();
   1.115 +
   1.116 +    public void setLineWidth(double width);
   1.117 +
   1.118 +    public double getMiterLimit();
   1.119 +
   1.120 +    public void setMiterLimit(double limit);
   1.121 +
   1.122 +    public String getFont();
   1.123 +
   1.124 +    public void setFont(String font);
   1.125 +
   1.126 +    public String getTextAlign();
   1.127 +
   1.128 +    public void setTextAlign(String textAlign);
   1.129 +
   1.130 +    public String getTextBaseline();
   1.131 +
   1.132 +    public void setTextBaseline(String textbaseline);
   1.133 +
   1.134 +    public void fillText(String text, double x, double y);
   1.135 +
   1.136 +    public void fillText(String text, double x, double y, double maxWidth);
   1.137 +
   1.138 +    public Dimension measureText(String text);
   1.139 +
   1.140 +    public void strokeText(String text, double x, double y);
   1.141 +
   1.142 +    public void strokeText(String text, double x, double y, double maxWidth);
   1.143 +
   1.144 +    public ImageData createImageData(double x, double y);
   1.145 +
   1.146 +    public ImageData createImageData(ImageData imageData);
   1.147 +
   1.148 +    public ImageData getImageData(double x, double y, double width, double height);
   1.149 +
   1.150 +    public void putImageData(ImageData imageData, double x, double y);
   1.151 +
   1.152 +    public void putImageData(ImageData imageData, double x, double y, double dirtyx, double dirtyy, double dirtywidth, double dirtyheight);
   1.153 +
   1.154 +    public void setGlobalAlpha(double alpha);
   1.155 +
   1.156 +    public double getGlobalAlpha();
   1.157 +
   1.158 +    public void setGlobalCompositeOperation(String operation);
   1.159 +
   1.160 +    public String getGlobalCompositeOperation();
   1.161 +
   1.162 +    public LinearGradient createLinearGradient(double x0, double y0, double x1, double y1);
   1.163 +
   1.164 +    public Pattern createPattern(ImageData image, String repeat);
   1.165 +
   1.166 +    public RadialGradient createRadialGradient(double x0, double y0, double r0, double x1, double y1, double r1);
   1.167 +    
   1.168 +    public ImageData getImageForPath(String path);
   1.169 +    
   1.170 +    public int getHeight();
   1.171 +
   1.172 +    public int getWidth();
   1.173 +
   1.174 +    public void setHeight(int height);
   1.175 +
   1.176 +    public void setWidth(int width);
   1.177 +    
   1.178 +}