diff -r 964e42c9448d -r 69c81bdaf193 javaquery/canvas/src/main/java/net/java/html/canvas/spi/GraphicsEnvironment.java --- a/javaquery/canvas/src/main/java/net/java/html/canvas/spi/GraphicsEnvironment.java Fri May 24 07:36:58 2013 +0200 +++ b/javaquery/canvas/src/main/java/net/java/html/canvas/spi/GraphicsEnvironment.java Fri May 24 12:29:58 2013 +0200 @@ -22,6 +22,7 @@ /** * Provider API for Canvas. Implement this to add support for your platform. + * * @author antonepple */ public interface GraphicsEnvironment { @@ -87,15 +88,32 @@ //// //// 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(); + /** + * When implementing you can return an Object of your choice to enable + * caching. Returning null means no caching. When caching is enabled, and + * the cache hasn't been invalidated, the Object you returned will be passed + * as a parameter. + * + * @param style The style object you should use to create your native style + * @param nativeStyle your native object if cached, null otherwise + * @return return native Object for caching + * + */ + public Object setFillStyle(Style style, Object nativeStyle); - public void setFillStyle(Style style); - - public void setStrokeStyle(String style); - - public void setStrokeStyle(Style style); + /** + * When implementing you can return an Object of your choice to enable + * caching. Returning null means no caching. When caching is enabled, and + * the cache hasn't been invalidated, the Object you returned will be passed + * as a parameter. + * + * @param style The style object you should use to create your native style + * @param nativeStyle your native object if cached, null otherwise + * @return return native Object for caching + * + */ + public Object setStrokeStyle(Style style, Object nativeStyle); public void setShadowColor(String color); @@ -105,8 +123,6 @@ public void setShadowOffsetY(double y); - public String getStrokeStyle(); - public String getShadowColor(); public double getShadowBlur(); @@ -162,7 +178,6 @@ //// 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(); @@ -172,7 +187,6 @@ public String getGlobalCompositeOperation(); //// public ImageData getImageForPath(String path); - public int getHeight(); public int getWidth();