SVG: implement stroke opacity
This commit is contained in:
parent
440914e49b
commit
f9eafefa09
@ -803,6 +803,9 @@ SVGGraphics = (function SVGGraphicsClosure() {
|
|||||||
setMiterLimit: function SVGGraphics_setMiterLimit(limit) {
|
setMiterLimit: function SVGGraphics_setMiterLimit(limit) {
|
||||||
this.current.miterLimit = limit;
|
this.current.miterLimit = limit;
|
||||||
},
|
},
|
||||||
|
setStrokeAlpha: function SVGGraphics_setStrokeAlpha(strokeAlpha) {
|
||||||
|
this.current.strokeAlpha = strokeAlpha;
|
||||||
|
},
|
||||||
setStrokeRGBColor: function SVGGraphics_setStrokeRGBColor(r, g, b) {
|
setStrokeRGBColor: function SVGGraphics_setStrokeRGBColor(r, g, b) {
|
||||||
var color = Util.makeCssRgb(r, g, b);
|
var color = Util.makeCssRgb(r, g, b);
|
||||||
this.current.strokeColor = color;
|
this.current.strokeColor = color;
|
||||||
@ -973,6 +976,9 @@ SVGGraphics = (function SVGGraphicsClosure() {
|
|||||||
case 'Font':
|
case 'Font':
|
||||||
this.setFont(value);
|
this.setFont(value);
|
||||||
break;
|
break;
|
||||||
|
case 'CA':
|
||||||
|
this.setStrokeAlpha(value);
|
||||||
|
break;
|
||||||
case 'ca':
|
case 'ca':
|
||||||
this.setFillAlpha(value);
|
this.setFillAlpha(value);
|
||||||
break;
|
break;
|
||||||
@ -992,6 +998,8 @@ SVGGraphics = (function SVGGraphicsClosure() {
|
|||||||
stroke: function SVGGraphics_stroke() {
|
stroke: function SVGGraphics_stroke() {
|
||||||
var current = this.current;
|
var current = this.current;
|
||||||
current.element.setAttributeNS(null, 'stroke', current.strokeColor);
|
current.element.setAttributeNS(null, 'stroke', current.strokeColor);
|
||||||
|
current.element.setAttributeNS(null, 'stroke-opacity',
|
||||||
|
current.strokeAlpha);
|
||||||
current.element.setAttributeNS(null, 'fill', 'none');
|
current.element.setAttributeNS(null, 'fill', 'none');
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user