<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -26,7 +26,7 @@ var Raphael = (function () {
                 &quot; SVG.\nYou are running &quot; + unescape(&quot;Rapha%EBl%20&quot;) + this.version;
     };
     // colour utilities
-    var hsb2rgb = function (hue, saturation, brightness) {
+    R.hsb2rgb = function (hue, saturation, brightness) {
         if (typeof hue == &quot;object&quot; &amp;&amp; &quot;h&quot; in hue &amp;&amp; &quot;s&quot; in hue &amp;&amp; &quot;b&quot; in hue) {
             brightness = hue.b;
             saturation = hue.s;
@@ -70,6 +70,55 @@ var Raphael = (function () {
         rgb.hex = &quot;#&quot; + r + g + b;
         return rgb;
     };
+    R.rgb2hsb = function (red, green, blue) {
+        if (typeof red == &quot;object&quot; &amp;&amp; &quot;r&quot; in red &amp;&amp; &quot;g&quot; in red &amp;&amp; &quot;b&quot; in red) {
+            blue = red.b;
+            green = red.g;
+            red = red.r;
+        }
+        if (typeof red == &quot;string&quot; &amp;&amp; red.charAt(0) == &quot;#&quot;) {
+            if (red.length == 4) {
+                blue = parseInt(red.substring(3), 16);
+                green = parseInt(red.substring(2, 3), 16);
+                red = parseInt(red.substring(1, 2), 16);
+            } else {
+                blue = parseInt(red.substring(5), 16);
+                green = parseInt(red.substring(3, 5), 16);
+                red = parseInt(red.substring(1, 3), 16);
+            }
+        }
+        if (red &gt; 1 || green &gt; 1 || blue &gt; 1) {
+            red /= 255;
+            green /= 255;
+            blue /= 255;
+        }
+        var max = Math.max(red, green, blue),
+            min = Math.min(red, green, blue),
+            hue,
+            saturation,
+            brightness = max;
+        if (min == max) {
+            return {h: 0, s: 0, b: max};
+        } else {
+            var delta = (max - min);
+            saturation = delta / max;
+            if (red == max) {
+                hue = (green - blue) / delta;
+            } else if (green == max) {
+                hue = 2 + ((blue - red) / delta);
+            } else {
+                hue = 4 + ((red - green) / delta);
+            }
+            hue /= 6;
+            if (hue &lt; 0) {
+                hue += 1;
+            }
+            if (hue &gt; 1) {
+                hue -= 1;
+            }
+        }
+        return {h: hue, s: saturation, b: brightness};
+    };
     var getRGB = function (colour) {
         var htmlcolors = {aliceblue: &quot;#f0f8ff&quot;, amethyst: &quot;#96c&quot;, antiquewhite: &quot;#faebd7&quot;, aqua: &quot;#0ff&quot;, aquamarine: &quot;#7fffd4&quot;, azure: &quot;#f0ffff&quot;, beige: &quot;#f5f5dc&quot;, bisque: &quot;#ffe4c4&quot;, black: &quot;#000&quot;, blanchedalmond: &quot;#ffebcd&quot;, blue: &quot;#00f&quot;, blueviolet: &quot;#8a2be2&quot;, brown: &quot;#a52a2a&quot;, burlywood: &quot;#deb887&quot;, cadetblue: &quot;#5f9ea0&quot;, chartreuse: &quot;#7fff00&quot;, chocolate: &quot;#d2691e&quot;, coral: &quot;#ff7f50&quot;, cornflowerblue: &quot;#6495ed&quot;, cornsilk: &quot;#fff8dc&quot;, crimson: &quot;#dc143c&quot;, cyan: &quot;#0ff&quot;, darkblue: &quot;#00008b&quot;, darkcyan: &quot;#008b8b&quot;, darkgoldenrod: &quot;#b8860b&quot;, darkgray: &quot;#a9a9a9&quot;, darkgreen: &quot;#006400&quot;, darkkhaki: &quot;#bdb76b&quot;, darkmagenta: &quot;#8b008b&quot;, darkolivegreen: &quot;#556b2f&quot;, darkorange: &quot;#ff8c00&quot;, darkorchid: &quot;#9932cc&quot;, darkred: &quot;#8b0000&quot;, darksalmon: &quot;#e9967a&quot;, darkseagreen: &quot;#8fbc8f&quot;, darkslateblue: &quot;#483d8b&quot;, darkslategray: &quot;#2f4f4f&quot;, darkturquoise: &quot;#00ced1&quot;, darkviolet: &quot;#9400d3&quot;, deeppink: &quot;#ff1493&quot;, deepskyblue: &quot;#00bfff&quot;, dimgray: &quot;#696969&quot;, dodgerblue: &quot;#1e90ff&quot;, firebrick: &quot;#b22222&quot;, floralwhite: &quot;#fffaf0&quot;, forestgreen: &quot;#228b22&quot;, fuchsia: &quot;#f0f&quot;, gainsboro: &quot;#dcdcdc&quot;, ghostwhite: &quot;#f8f8ff&quot;, gold: &quot;#ffd700&quot;, goldenrod: &quot;#daa520&quot;, gray: &quot;#808080&quot;, green: &quot;#008000&quot;, greenyellow: &quot;#adff2f&quot;, honeydew: &quot;#f0fff0&quot;, hotpink: &quot;#ff69b4&quot;, indianred: &quot;#cd5c5c&quot;, indigo: &quot;#4b0082&quot;, ivory: &quot;#fffff0&quot;, khaki: &quot;#f0e68c&quot;, lavender: &quot;#e6e6fa&quot;, lavenderblush: &quot;#fff0f5&quot;, lawngreen: &quot;#7cfc00&quot;, lemonchiffon: &quot;#fffacd&quot;, lightblue: &quot;#add8e6&quot;, lightcoral: &quot;#f08080&quot;, lightcyan: &quot;#e0ffff&quot;, lightgoldenrodyellow: &quot;#fafad2&quot;, lightgreen: &quot;#90ee90&quot;, lightgrey: &quot;#d3d3d3&quot;, lightpink: &quot;#ffb6c1&quot;, lightsalmon: &quot;#ffa07a&quot;, lightsalmon: &quot;#ffa07a&quot;, lightseagreen: &quot;#20b2aa&quot;, lightskyblue: &quot;#87cefa&quot;, lightslategray: &quot;#789&quot;, lightsteelblue: &quot;#b0c4de&quot;, lightyellow: &quot;#ffffe0&quot;, lime: &quot;#0f0&quot;, limegreen: &quot;#32cd32&quot;, linen: &quot;#faf0e6&quot;, magenta: &quot;#f0f&quot;, maroon: &quot;#800000&quot;, mediumaquamarine: &quot;#66cdaa&quot;, mediumblue: &quot;#0000cd&quot;, mediumorchid: &quot;#ba55d3&quot;, mediumpurple: &quot;#9370db&quot;, mediumseagreen: &quot;#3cb371&quot;, mediumslateblue: &quot;#7b68ee&quot;, mediumslateblue: &quot;#7b68ee&quot;, mediumspringgreen: &quot;#00fa9a&quot;, mediumturquoise: &quot;#48d1cc&quot;, mediumvioletred: &quot;#c71585&quot;, midnightblue: &quot;#191970&quot;, mintcream: &quot;#f5fffa&quot;, mistyrose: &quot;#ffe4e1&quot;, moccasin: &quot;#ffe4b5&quot;, navajowhite: &quot;#ffdead&quot;, navy: &quot;#000080&quot;, oldlace: &quot;#fdf5e6&quot;, olive: &quot;#808000&quot;, olivedrab: &quot;#6b8e23&quot;, orange: &quot;#ffa500&quot;, orangered: &quot;#ff4500&quot;, orchid: &quot;#da70d6&quot;, palegoldenrod: &quot;#eee8aa&quot;, palegreen: &quot;#98fb98&quot;, paleturquoise: &quot;#afeeee&quot;, palevioletred: &quot;#db7093&quot;, papayawhip: &quot;#ffefd5&quot;, peachpuff: &quot;#ffdab9&quot;, peru: &quot;#cd853f&quot;, pink: &quot;#ffc0cb&quot;, plum: &quot;#dda0dd&quot;, powderblue: &quot;#b0e0e6&quot;, purple: &quot;#800080&quot;, red: &quot;#f00&quot;, rosybrown: &quot;#bc8f8f&quot;, royalblue: &quot;#4169e1&quot;, saddlebrown: &quot;#8b4513&quot;, salmon: &quot;#fa8072&quot;, sandybrown: &quot;#f4a460&quot;, seagreen: &quot;#2e8b57&quot;, seashell: &quot;#fff5ee&quot;, sienna: &quot;#a0522d&quot;, silver: &quot;#c0c0c0&quot;, skyblue: &quot;#87ceeb&quot;, slateblue: &quot;#6a5acd&quot;, slategray: &quot;#708090&quot;, snow: &quot;#fffafa&quot;, springgreen: &quot;#00ff7f&quot;, steelblue: &quot;#4682b4&quot;, tan: &quot;#d2b48c&quot;, teal: &quot;#008080&quot;, thistle: &quot;#d8bfd8&quot;, tomato: &quot;#ff6347&quot;, turquoise: &quot;#40e0d0&quot;, violet: &quot;#ee82ee&quot;, wheat: &quot;#f5deb3&quot;, white: &quot;#fff&quot;, whitesmoke: &quot;#f5f5f5&quot;, yellow: &quot;#ff0&quot;, yellowgreen: &quot;#9acd32&quot;};
         if (colour.toString().toLowerCase() in htmlcolors) {
@@ -111,14 +160,14 @@ var Raphael = (function () {
                 red = parseFloat(rgb[0], 10);
                 green = parseFloat(rgb[1], 10);
                 blue = parseFloat(rgb[2], 10);
-                return hsb2rgb(red, green, blue);
+                return Raphael.hsb2rgb(red, green, blue);
             }
             if (rgb[7]) {
                 rgb = rgb[7].split(/\s*,\s*/);
                 red = parseFloat(rgb[0], 10) * 2.55;
                 green = parseFloat(rgb[1], 10) * 2.55;
                 blue = parseFloat(rgb[2], 10) * 2.55;
-                return hsb2rgb(red, green, blue);
+                return Raphael.hsb2rgb(red, green, blue);
             }
             var rgb = {r: red, g: green, b: blue};
             var r = Math.round(red).toString(16);
@@ -135,7 +184,7 @@ var Raphael = (function () {
     };
     R.getColor = function (value) {
         var start = arguments.callee.start = arguments.callee.start || {h: 0, s: 1, b: value || .75};
-        var rgb = hsb2rgb(start.h, start.s, start.b);
+        var rgb = Raphael.hsb2rgb(start.h, start.s, start.b);
         start.h += .075;
         if (start.h &gt; 1) {
             start.h = 0;
@@ -1608,8 +1657,8 @@ var Raphael = (function () {
             } else {
                 gs.left = left + &quot;px&quot;;
                 gs.top = top + &quot;px&quot;;
-                this.X = x - left;
-                this.Y = y - top;
+                this.X = x;
+                this.Y = y;
                 this.W = w;
                 this.H = h;
                 gs.width = this.vml.width + &quot;px&quot;;
@@ -1856,7 +1905,7 @@ var Raphael = (function () {
             d.style.position = &quot;relative&quot;;
             rs.width  = width;
             rs.height = height;
-            r.coordsize = (width == &quot;100%&quot; ? width : parseFloat(width)) + &quot; &quot; + (height == &quot;100%&quot; ? height : parseFloat(height));
+            r.coordsize = (/%$/.test(width) ? width : parseFloat(width, 10)) + &quot; &quot; + (/%$/.test(height) ? height : parseFloat(height, 10));
             r.coordorigin = &quot;0 0&quot;;
 
             var b = document.createElement(&quot;rvml:rect&quot;), bs = b.style;</diff>
      <filename>raphael.js</filename>
    </modified>
    <modified>
      <diff>@@ -632,7 +632,8 @@ var c = paper.path({stroke: &quot;#036&quot;}).moveTo(10, 10).lineTo(50, 50);&lt;/code&gt;&lt;/pre&gt;
                             &lt;a href=&quot;http://creativecommons.org/licenses/by-sa/3.0/&quot; title=&quot;Creative Commons Attribution-ShareAlike 3.0 Unported&quot; rel=&quot;license&quot;&gt;Some Rights Reserved&lt;/a&gt; by &lt;a href=&quot;http://dmitry.baranovskiy.com/&quot;&gt;Dmitry Baranovskiy&lt;/a&gt;
                         &lt;/h3&gt;
                         &lt;h3 id=&quot;font&quot;&gt;
-                            A font by &lt;a href=&quot;http://www.exljbris.nl&quot;&gt;Jos Buivenga&lt;/a&gt; | Logo by &lt;a href=&quot;http://wasabicube.com/&quot;&gt;Wasabicube&lt;/a&gt;
+                            Font by &lt;a href=&quot;http://www.exljbris.nl&quot;&gt;Jos Buivenga&lt;/a&gt; &#183; Logo by &lt;a href=&quot;http://wasabicube.com/&quot;&gt;Wasabicube&lt;/a&gt; &#183;
+                            Work at this project started as 20% time at &lt;a href=&quot;http://www.atlassian.com/&quot; title=&quot;Atlassian &#8212; Software to Track, Test &amp;#38; Collaborate, from Enterprises to Open Source Projects.&quot;&gt;Atlassian&lt;/a&gt;
                         &lt;/h3&gt;
                     &lt;/div&gt;
                 &lt;/div&gt;</diff>
      <filename>reference.html</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>4178d8d192702e219d8340a6783d9f1ddbc6ed0d</id>
    </parent>
  </parents>
  <author>
    <name>Dmitry Baranovskiy</name>
    <email>dbaranovskiy@Fresh-Air.sydney.atlassian.com</email>
  </author>
  <url>http://github.com/DmitryBaranovskiy/raphael/commit/fc37338d952a3e37784d073d6b1349a2fa27b535</url>
  <id>fc37338d952a3e37784d073d6b1349a2fa27b535</id>
  <committed-date>2009-02-22T15:54:23-08:00</committed-date>
  <authored-date>2009-02-22T15:54:23-08:00</authored-date>
  <message>&#8226; fix for getBBox in IE
&#8226; returned rgb2hsb function
&#8226; added some copyrights to reference.html</message>
  <tree>5dd309fc2233413b274a4e2e4ee9840c8a93ebb5</tree>
  <committer>
    <name>Dmitry Baranovskiy</name>
    <email>dbaranovskiy@Fresh-Air.sydney.atlassian.com</email>
  </committer>
</commit>
