svnno****@sourc*****
svnno****@sourc*****
2010年 10月 17日 (日) 23:21:58 JST
Revision: 2062
http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=2062
Author: dhrname
Date: 2010-10-17 23:21:58 +0900 (Sun, 17 Oct 2010)
Log Message:
-----------
currentColorの実装
Modified Paths:
--------------
branches/06x/061/org/w3c/dom/css.js
branches/06x/061/org/w3c/dom/svg.js
Modified: branches/06x/061/org/w3c/dom/css.js
===================================================================
--- branches/06x/061/org/w3c/dom/css.js 2010-10-16 12:40:29 UTC (rev 2061)
+++ branches/06x/061/org/w3c/dom/css.js 2010-10-17 14:21:58 UTC (rev 2062)
@@ -282,6 +282,7 @@
}
}
ti.setPaint(paintType, uri, color, null);
+ paintType = uri = color = null;
} else if (propertyName === "color") {
var ti = new CSSPrimitiveValue();
var fill = this.getPropertyCSSValue("fill"), stroke = this.getPropertyCSSValue("stroke");
Modified: branches/06x/061/org/w3c/dom/svg.js
===================================================================
--- branches/06x/061/org/w3c/dom/svg.js 2010-10-16 12:40:29 UTC (rev 2061)
+++ branches/06x/061/org/w3c/dom/svg.js 2010-10-17 14:21:58 UTC (rev 2062)
@@ -665,7 +665,7 @@
// raises( SVGException );
/*void*/ SVGColor.prototype.setColor =function(/*unsigned short*/ colorType, /*DOMString*/ rgbColor, /*DOMString*/ iccColor ){
this.colorType = colorType;
- if (colorType === SVGColor.SVG_COLORTYPE_RGBCOLOR) {
+ if ((colorType === SVGColor.SVG_COLORTYPE_RGBCOLOR) || (colorType === SVGColor.SVG_COLORTYPE_CURRENTCOLOR)) {
this.setRGBColor(rgbColor);
}
}
@@ -2132,6 +2132,10 @@
var style = tod.defaultView.getComputedStyle(tar, "");
var el = tar._tar, fill = style.getPropertyCSSValue("fill"), stroke = style.getPropertyCSSValue("stroke");
if (fill.paintType === /*SVGPaint.SVG_PAINTTYPE_RGBCOLOR*/ 1 || fill.paintType === /*SVGPaint.SVG_PAINTTYPE_CURRENTCOLOR*/ 102) {
+ if (fill.paintType === /*SVGPaint.SVG_PAINTTYPE_CURRENTCOLOR*/ 102) {
+ /*再度、設定。css.jsのsetPropertyを参照*/
+ style.setProperty("color", style.getPropertyValue("color"));
+ }
var fillElement = !!tar._fillElement ? tar._fillElement : document.createElement("v:fill");
var fc = fill.rgbColor, num = /*CSSPrimitiveValue.CSS_NUMBER*/ 1;
fillElement.setAttribute("color", "rgb(" +fc.red.getFloatValue(num)+ "," +fc.green.getFloatValue(num)+ "," +fc.blue.getFloatValue(num)+ ")");
@@ -2169,6 +2173,10 @@
el.filled = "false";
}
if (stroke.paintType === /*SVGPaint.SVG_PAINTTYPE_RGBCOLOR*/ 1 || stroke.paintType === /*SVGPaint.SVG_PAINTTYPE_CURRENTCOLOR*/ 102) {
+ if (stroke.paintType === /*SVGPaint.SVG_PAINTTYPE_CURRENTCOLOR*/ 102) {
+ /*再度、設定。css.jsのsetPropertyを参照*/
+ style.setProperty("color", style.getPropertyValue("color"));
+ }
var strokeElement = !!tar._strokeElement ? tar._strokeElement : document.createElement("v:stroke");
var sgsw = style.getPropertyCSSValue("stroke-width"), w = tod.documentElement.viewport.width, h = tod.documentElement.viewport.height;
sgsw._percent = Math.sqrt((w*w + h*h) / 2);