svnno****@sourc*****
svnno****@sourc*****
2010年 7月 16日 (金) 21:58:28 JST
Revision: 1954
http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=1954
Author: dhrname
Date: 2010-07-16 21:58:28 +0900 (Fri, 16 Jul 2010)
Log Message:
-----------
RGB色値に関する修正
Modified Paths:
--------------
branches/06x/061/org/w3c/dom/svg.js
Modified: branches/06x/061/org/w3c/dom/svg.js
===================================================================
--- branches/06x/061/org/w3c/dom/svg.js 2010-07-16 12:51:55 UTC (rev 1953)
+++ branches/06x/061/org/w3c/dom/svg.js 2010-07-16 12:58:28 UTC (rev 1954)
@@ -575,14 +575,16 @@
var s = rgbColor.match(/\d+/g);
} else if (rgbColor.indexOf("#") === 0) { //#を含む場合
var s = [], _parseInt = parseInt;
+ var r = rgbColor.charAt(1), g = rgbColor.charAt(2), b = rgbColor.charAt(3)
if (rgbColor.length < 5) {
- var c = "#" + rgbColor.charAt(1) + rgbColor.charAt(1) + rgbColor.charAt(2) + rgbColor.charAt(2) + rgbColor.charAt(3) + rgbColor.charAt(3);
+ var c = "#" + r + r + g + g + b + b;
rgbColor = c;
c = null;
}
- s[0] = _parseInt(rgbColor.charAt(1)+rgbColor.charAt(2), 16)+ "";
+ s[0] = _parseInt(r+rgbColor.charAt(2), 16)+ "";
s[1] = _parseInt(rgbColor.charAt(3)+rgbColor.charAt(4), 16)+ "";
s[2] = _parseInt(rgbColor.charAt(5)+rgbColor.charAt(6), 16)+ "";
+ r = g = b = null;
} else {
var s = rgbColor.match(/\d+/g);
}