1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/javaquery/canvas/src/main/java/net/java/html/canvas/Color.java Mon May 27 10:00:12 2013 +0200
1.3 @@ -0,0 +1,27 @@
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 +/**
1.11 + *
1.12 + * @author antonepple
1.13 + */
1.14 +public class Color extends Style{
1.15 +
1.16 + String web;
1.17 +
1.18 + /**
1.19 + * Creates an RGB color specified with an HTML or CSS attribute string.
1.20 + * @param webColor Colordefined as
1.21 + */
1.22 + Color(String webColor) {
1.23 + this.web = web;
1.24 + }
1.25 +
1.26 + public String getAsString(){
1.27 + return web;
1.28 + }
1.29 +
1.30 +}
2.1 --- a/javaquery/canvas/src/main/java/net/java/html/canvas/Style.java Mon May 27 08:30:30 2013 +0200
2.2 +++ b/javaquery/canvas/src/main/java/net/java/html/canvas/Style.java Mon May 27 10:00:12 2013 +0200
2.3 @@ -41,6 +41,10 @@
2.4 return new Pattern(imageResource, repeat);
2.5 }
2.6
2.7 + public static final Color createColor(String webColor) {
2.8 + return new Color(webColor);
2.9 + }
2.10 +
2.11 void cache(Object toCache) {
2.12 cacheHash = hashCode();
2.13 this.cached = toCache;