1.1 --- a/javaquery/canvas/src/main/java/net/java/html/canvas/Dimension.java Mon May 27 10:39:09 2013 +0200
1.2 +++ b/javaquery/canvas/src/main/java/net/java/html/canvas/Dimension.java Mon May 27 11:18:05 2013 +0200
1.3 @@ -5,7 +5,8 @@
1.4 package net.java.html.canvas;
1.5
1.6 /**
1.7 - *
1.8 + * Just a simple class to replace the need of java.awt.Dimension, since we only
1.9 + * want to use Java core APIs to keep porting simple.
1.10 * @author antonepple
1.11 */
1.12 public class Dimension {
2.1 --- a/javaquery/canvas/src/main/java/net/java/html/canvas/GraphicsContext.java Mon May 27 10:39:09 2013 +0200
2.2 +++ b/javaquery/canvas/src/main/java/net/java/html/canvas/GraphicsContext.java Mon May 27 11:18:05 2013 +0200
2.3 @@ -24,7 +24,8 @@
2.4 import net.java.html.canvas.spi.GraphicsEnvironment;
2.5
2.6 /**
2.7 - *
2.8 + * A 2D Graphics Context similar to HTML5 or JavaFX GraphicsContext.
2.9 + * Use this to paint on your Canvas.s
2.10 * @author antonepple
2.11 */
2.12 public final class GraphicsContext {
3.1 --- a/javaquery/canvas/src/main/java/net/java/html/canvas/Image.java Mon May 27 10:39:09 2013 +0200
3.2 +++ b/javaquery/canvas/src/main/java/net/java/html/canvas/Image.java Mon May 27 11:18:05 2013 +0200
3.3 @@ -20,8 +20,7 @@
3.4 import java.util.Objects;
3.5
3.6 /**
3.7 - * Image represents an Image defined by a Path.
3.8 - *
3.9 + * Image represents an Image Resource defined by a path.
3.10 *
3.11 * @author antonepple
3.12 */
4.1 --- a/javaquery/canvas/src/main/java/net/java/html/canvas/ImageData.java Mon May 27 10:39:09 2013 +0200
4.2 +++ b/javaquery/canvas/src/main/java/net/java/html/canvas/ImageData.java Mon May 27 11:18:05 2013 +0200
4.3 @@ -18,8 +18,10 @@
4.4 package net.java.html.canvas;
4.5
4.6 /**
4.7 - * ImageData is an updateable 2-Dimensional Array of Colour values.
4.8 - * Created ( createPixelMap / getSnapShot ) and rendered ( paintPixelMap ) by GraphicsContext .
4.9 + * ImageData is an updateable 2-Dimensional Map of Color values.
4.10 + * Created ( createPixelMap / getSnapShot ) by GraphicsContext.
4.11 + * you can modify the individual pixels and render it using paintPixelMap on
4.12 + * GraphicsContext
4.13 *
4.14 * @author antonepple
4.15 */
5.1 --- a/javaquery/canvas/src/main/java/net/java/html/canvas/Style.java Mon May 27 10:39:09 2013 +0200
5.2 +++ b/javaquery/canvas/src/main/java/net/java/html/canvas/Style.java Mon May 27 11:18:05 2013 +0200
5.3 @@ -21,12 +21,16 @@
5.4 import java.util.Objects;
5.5
5.6 /**
5.7 + * Style for Stroke and Fill of GraphicsContext. Styles are created using
5.8 + * GraphicsContexts factory methods. If the Implementation supports it, native
5.9 + * Styles will be cached for performance reasons. This happens the first time
5.10 + * the Style is actually used.
5.11 *
5.12 * @author antonepple
5.13 */
5.14 public class Style {
5.15
5.16 - private Object cached;
5.17 + Object cached;
5.18 private int cacheHash;
5.19
5.20 Style() {
5.21 @@ -241,6 +245,9 @@
5.22 if (Double.doubleToLongBits(this.r1) != Double.doubleToLongBits(other.r1)) {
5.23 return false;
5.24 }
5.25 + if ((this.getCached() == null) != (other.getCached() == null)) {
5.26 + return false;
5.27 + }
5.28 return true;
5.29 }
5.30 }