1.1 --- a/javaquery/canvas/src/main/java/net/java/html/canvas/GraphicsContext.java Thu May 23 08:07:54 2013 +0200
1.2 +++ b/javaquery/canvas/src/main/java/net/java/html/canvas/GraphicsContext.java Thu May 23 08:15:11 2013 +0200
1.3 @@ -313,15 +313,15 @@
1.4 }
1.5
1.6 public LinearGradient createLinearGradient(double x0, double y0, double x1, double y1){
1.7 - return graphicsEnvironmentImpl.createLinearGradient(x0, y0, x1, y1);
1.8 + return new LinearGradient(x0, y0, x1, y1);
1.9 }
1.10
1.11 public Pattern createPattern(ImageData image, String repeat){
1.12 - return graphicsEnvironmentImpl.createPattern(image, repeat);
1.13 + return new Pattern(image, repeat);
1.14 }
1.15
1.16 public RadialGradient createRadialGradient(double x0, double y0, double r0, double x1, double y1, double r1){
1.17 - return graphicsEnvironmentImpl.createRadialGradient(x0, y0, r0, x1, y1, r1);
1.18 + return new RadialGradient(x0, y0, r0, x1, y1, r1);
1.19 }
1.20
1.21 public ImageData getImageDataForPath(String path){
2.1 --- a/javaquery/canvas/src/main/java/net/java/html/canvas/GraphicsEnvironment.java Thu May 23 08:07:54 2013 +0200
2.2 +++ b/javaquery/canvas/src/main/java/net/java/html/canvas/GraphicsEnvironment.java Thu May 23 08:15:11 2013 +0200
2.3 @@ -170,12 +170,6 @@
2.4
2.5 public String getGlobalCompositeOperation();
2.6
2.7 - public LinearGradient createLinearGradient(double x0, double y0, double x1, double y1);
2.8 -
2.9 - public Pattern createPattern(ImageData image, String repeat);
2.10 -
2.11 - public RadialGradient createRadialGradient(double x0, double y0, double r0, double x1, double y1, double r1);
2.12 -
2.13 public void addColorStop(LinearGradient gradient, double position, String color);
2.14
2.15 public ImageData getImageDataForPath(String path);
3.1 --- a/javaquery/canvas/src/main/java/net/java/html/canvas/LinearGradient.java Thu May 23 08:07:54 2013 +0200
3.2 +++ b/javaquery/canvas/src/main/java/net/java/html/canvas/LinearGradient.java Thu May 23 08:15:11 2013 +0200
3.3 @@ -29,6 +29,15 @@
3.4
3.5 double x0, y0, x1, y1;
3.6
3.7 + public LinearGradient( double x0, double y0, double x1, double y1) {
3.8 + this.x0 = x0;
3.9 + this.y0 = y0;
3.10 + this.x1 = x1;
3.11 + this.y1 = y1;
3.12 + }
3.13 +
3.14 +
3.15 +
3.16 void addColorStop(double position, String color){
3.17 if (stops == null) stops = new HashMap<>();
3.18 stops.put(position, color);
4.1 --- a/javaquery/canvas/src/main/java/net/java/html/canvas/Pattern.java Thu May 23 08:07:54 2013 +0200
4.2 +++ b/javaquery/canvas/src/main/java/net/java/html/canvas/Pattern.java Thu May 23 08:15:11 2013 +0200
4.3 @@ -26,6 +26,11 @@
4.4 ImageData imageData;
4.5 String repeat;
4.6
4.7 + public Pattern(ImageData imageData, String repeat) {
4.8 + this.imageData = imageData;
4.9 + this.repeat = repeat;
4.10 + }
4.11 +
4.12 public ImageData getImageData() {
4.13 return imageData;
4.14 }
5.1 --- a/javaquery/canvas/src/main/java/net/java/html/canvas/RadialGradient.java Thu May 23 08:07:54 2013 +0200
5.2 +++ b/javaquery/canvas/src/main/java/net/java/html/canvas/RadialGradient.java Thu May 23 08:15:11 2013 +0200
5.3 @@ -24,6 +24,12 @@
5.4 public class RadialGradient extends LinearGradient{
5.5 double r0, r1;
5.6
5.7 + public RadialGradient( double x0, double y0,double r0, double x1, double y1, double r1) {
5.8 + super(x0, y0, x1, y1);
5.9 + this.r0 = r0;
5.10 + this.r1 = r1;
5.11 + }
5.12 +
5.13 public double getR0() {
5.14 return r0;
5.15 }