javaquery/canvas/src/main/java/net/java/html/canvas/spi/GraphicsEnvironment.java
branchcanvas
changeset 1141 69c81bdaf193
parent 1137 964e42c9448d
child 1144 5bf850c5b7f1
     1.1 --- a/javaquery/canvas/src/main/java/net/java/html/canvas/spi/GraphicsEnvironment.java	Fri May 24 07:36:58 2013 +0200
     1.2 +++ b/javaquery/canvas/src/main/java/net/java/html/canvas/spi/GraphicsEnvironment.java	Fri May 24 12:29:58 2013 +0200
     1.3 @@ -22,6 +22,7 @@
     1.4  
     1.5  /**
     1.6   * Provider API for Canvas. Implement this to add support for your platform.
     1.7 + *
     1.8   * @author antonepple
     1.9   */
    1.10  public interface GraphicsEnvironment {
    1.11 @@ -87,15 +88,32 @@
    1.12  ////
    1.13  ////    public void drawImage(ImageData image, double sx, double sy, double sWidth, double sHeight, double x, double y, double width, double height);
    1.14  //
    1.15 -    public void setFillStyle(String style);
    1.16  
    1.17 -    public String getFillStyle();
    1.18 +    /**
    1.19 +     * When implementing you can return an Object of your choice to enable
    1.20 +     * caching. Returning null means no caching. When caching is enabled, and
    1.21 +     * the cache hasn't been invalidated, the Object you returned will be passed
    1.22 +     * as a parameter.
    1.23 +     *
    1.24 +     * @param style The style object you should use to create your native style
    1.25 +     * @param nativeStyle your native object if cached, null otherwise
    1.26 +     * @return return native Object for caching
    1.27 +     *
    1.28 +     */
    1.29 +    public Object setFillStyle(Style style, Object nativeStyle);
    1.30  
    1.31 -    public void setFillStyle(Style style);
    1.32 -
    1.33 -    public void setStrokeStyle(String style);
    1.34 -
    1.35 -    public void setStrokeStyle(Style style);
    1.36 +    /**
    1.37 +     * When implementing you can return an Object of your choice to enable
    1.38 +     * caching. Returning null means no caching. When caching is enabled, and
    1.39 +     * the cache hasn't been invalidated, the Object you returned will be passed
    1.40 +     * as a parameter.
    1.41 +     *
    1.42 +     * @param style The style object you should use to create your native style
    1.43 +     * @param nativeStyle your native object if cached, null otherwise
    1.44 +     * @return return native Object for caching
    1.45 +     *
    1.46 +     */
    1.47 +    public Object setStrokeStyle(Style style, Object nativeStyle);
    1.48  
    1.49      public void setShadowColor(String color);
    1.50  
    1.51 @@ -105,8 +123,6 @@
    1.52  
    1.53      public void setShadowOffsetY(double y);
    1.54  
    1.55 -    public String getStrokeStyle();
    1.56 -
    1.57      public String getShadowColor();
    1.58  
    1.59      public double getShadowBlur();
    1.60 @@ -162,7 +178,6 @@
    1.61  ////    public void putImageData(ImageData imageData, double x, double y);
    1.62  ////
    1.63  ////    public void putImageData(ImageData imageData, double x, double y, double dirtyx, double dirtyy, double dirtywidth, double dirtyheight);
    1.64 -
    1.65      public void setGlobalAlpha(double alpha);
    1.66  
    1.67      public double getGlobalAlpha();
    1.68 @@ -172,7 +187,6 @@
    1.69      public String getGlobalCompositeOperation();
    1.70  
    1.71  ////    public ImageData getImageForPath(String path);
    1.72 -
    1.73      public int getHeight();
    1.74  
    1.75      public int getWidth();