void InitDefaults() { isStrokeWidth = false; this._visibility = SVGVisibility.Visible; this._display = SVGDisplay.Inline; this._overflow = SVGOverflow.visible; this._clipPathUnits = SVGClipPathUnits.UserSpaceOnUse; this._clipRule = SVGClipRule.nonzero; this._opacity = 1f; this._fillOpacity = 1f; this._strokeOpacity = 1f; this._fillColor = new SVGColor(); this._strokeColor = new SVGColor(); this._strokeWidth = new SVGLength(1); this._strokeLineJoin = SVGStrokeLineJoinMethod.Miter; this._strokeLineCap = SVGStrokeLineCapMethod.Butt; this._fillRule = SVGFillRule.NonZero; this._miterLimit = new SVGLength(4); this._dashArray = null; this._dashOfset = new SVGLength(0); this._cssStyle = new Dictionary <string, Dictionary <string, string> >(); this._clipPathList = new List <List <Vector2> >(); this._linearGradList = new Dictionary <string, SVGLinearGradientElement>(); this._radialGradList = new Dictionary <string, SVGRadialGradientElement>(); this._conicalGradList = new Dictionary <string, SVGConicalGradientElement>(); }
public SVGPaintable(SVGPaintable inheritPaintable, AttributeList attrList) { this._linearGradList = inheritPaintable.linearGradList; this._radialGradList = inheritPaintable.radialGradList;; Initialize(attrList); if(IsFillX() == false) { if(inheritPaintable.IsLinearGradiantFill()) { this._gradientID = inheritPaintable.gradientID; } else if(inheritPaintable.IsRadialGradiantFill()) { this._gradientID = inheritPaintable.gradientID; } else this._fillColor = inheritPaintable.fillColor; } if(!IsStroke()&& inheritPaintable.IsStroke()) { this._strokeColor = inheritPaintable.strokeColor; } if(_strokeLineCap == SVGStrokeLineCapMethod.Unknown) { _strokeLineCap = inheritPaintable.strokeLineCap; } if(_strokeLineJoin == SVGStrokeLineJoinMethod.Unknown) { _strokeLineJoin = inheritPaintable.strokeLineJoin; } if(isStrokeWidth == false) this._strokeWidth.NewValueSpecifiedUnits(inheritPaintable.strokeWidth); }
public SVGPaintable(SVGPaintable inheritPaintable, Dictionary<string, string> attrList) { _linearGradList = inheritPaintable.linearGradList; _radialGradList = inheritPaintable.radialGradList; Initialize(attrList); if(IsFillX() == false) { if(inheritPaintable.IsLinearGradiantFill()) _gradientID = inheritPaintable.gradientID; else if(inheritPaintable.IsRadialGradiantFill()) _gradientID = inheritPaintable.gradientID; else _fillColor = inheritPaintable.fillColor; } if(!IsStroke() && inheritPaintable.IsStroke()) _strokeColor = inheritPaintable.strokeColor; if(_strokeLineCap == SVGStrokeLineCapMethod.Unknown) _strokeLineCap = inheritPaintable.strokeLineCap; if(_strokeLineJoin == SVGStrokeLineJoinMethod.Unknown) _strokeLineJoin = inheritPaintable.strokeLineJoin; if(isStrokeWidth == false) _strokeWidth.NewValueSpecifiedUnits(inheritPaintable.strokeWidth); }
private void SetStrokeLineCap(string lineCapType) { switch (lineCapType) { case "butt": _strokeLineCap = SVGStrokeLineCapMethod.Butt; break; case "round": _strokeLineCap = SVGStrokeLineCapMethod.Round; break; case "square": _strokeLineCap = SVGStrokeLineCapMethod.Square; break; } }
public static StrokeLineCap GetStrokeLineCap(SVGStrokeLineCapMethod capMethod) { switch(capMethod) { case SVGStrokeLineCapMethod.Butt: return StrokeLineCap.butt; case SVGStrokeLineCapMethod.Round: return StrokeLineCap.round; case SVGStrokeLineCapMethod.Square: return StrokeLineCap.square; } return StrokeLineCap.butt; }
public static StrokeLineCap GetStrokeLineCap(SVGStrokeLineCapMethod capMethod) { switch (capMethod) { case SVGStrokeLineCapMethod.Butt: return(StrokeLineCap.butt); case SVGStrokeLineCapMethod.Round: return(StrokeLineCap.round); case SVGStrokeLineCapMethod.Square: return(StrokeLineCap.square); } return(StrokeLineCap.butt); }
public SVGPaintable(SVGPaintable inheritPaintable, Dictionary <string, string> attrList) { _linearGradList = inheritPaintable.linearGradList; _radialGradList = inheritPaintable.radialGradList; Initialize(attrList); if (IsFillX() == false) { if (inheritPaintable.IsLinearGradiantFill()) { _gradientID = inheritPaintable.gradientID; } else if (inheritPaintable.IsRadialGradiantFill()) { _gradientID = inheritPaintable.gradientID; } else { _fillColor = inheritPaintable.fillColor; } } if (!IsStroke() && inheritPaintable.IsStroke()) { _strokeColor = inheritPaintable.strokeColor; } if (_strokeLineCap == SVGStrokeLineCapMethod.Unknown) { _strokeLineCap = inheritPaintable.strokeLineCap; } if (_strokeLineJoin == SVGStrokeLineJoinMethod.Unknown) { _strokeLineJoin = inheritPaintable.strokeLineJoin; } if (isStrokeWidth == false) { _strokeWidth.NewValueSpecifiedUnits(inheritPaintable.strokeWidth); } }
/***********************************************************************************/ private void SetStrokeLineCap(string lineCapType) { switch(lineCapType) { case "butt" : _strokeLineCap = SVGStrokeLineCapMethod.Butt; break; case "round" : _strokeLineCap = SVGStrokeLineCapMethod.Round; break; case "square" : _strokeLineCap = SVGStrokeLineCapMethod.Square;break; } }
public void SetStrokeLineCap(SVGStrokeLineCapMethod strokeLineCap) { this._strokeLineCap = strokeLineCap; }
//-------------------------------------------------------------------------------- //Method: SetStrokeLineCap //-------------------------------------------------------------------------------- public void SetStrokeLineCap(SVGStrokeLineCapMethod strokeLineCap) { this._strokeLineCap = strokeLineCap; }
public SVGPaintable(SVGPaintable inheritPaintable, Node node) { InitDefaults(); if (inheritPaintable != null) { this._visibility = inheritPaintable.visibility; this._display = inheritPaintable.display; this._clipRule = inheritPaintable.clipRule; this._viewport = inheritPaintable._viewport; this._fillRule = inheritPaintable._fillRule; this._cssStyle = inheritPaintable._cssStyle; this._clipPathList = CloneClipPathList(inheritPaintable._clipPathList); this._linearGradList = inheritPaintable._linearGradList; this._radialGradList = inheritPaintable._radialGradList; this._conicalGradList = inheritPaintable._conicalGradList; } if (inheritPaintable != null) { if (IsFillX() == false) { if (inheritPaintable.IsLinearGradiantFill()) { this._gradientID = inheritPaintable.gradientID; } else if (inheritPaintable.IsRadialGradiantFill()) { this._gradientID = inheritPaintable.gradientID; } else { this._fillColor = inheritPaintable.fillColor; } } if (!IsStroke() && inheritPaintable.IsStroke()) { this._strokeColor = inheritPaintable.strokeColor; } if (_strokeLineCap == SVGStrokeLineCapMethod.Unknown) { _strokeLineCap = inheritPaintable.strokeLineCap; } if (_strokeLineJoin == SVGStrokeLineJoinMethod.Unknown) { _strokeLineJoin = inheritPaintable.strokeLineJoin; } if (isStrokeWidth == false) { this._strokeWidth.NewValueSpecifiedUnits(inheritPaintable.strokeWidth); } } Initialize(node.attributes); ReadCSS(node); if (inheritPaintable != null) { _opacity *= inheritPaintable._opacity; _fillOpacity *= inheritPaintable._fillOpacity; _strokeOpacity *= inheritPaintable._strokeOpacity; } }
void InitDefaults() { isStrokeWidth = false; this._visibility = SVGVisibility.Visible; this._display = SVGDisplay.Inline; this._overflow = SVGOverflow.visible; this._clipPathUnits = SVGClipPathUnits.UserSpaceOnUse; this._clipRule = SVGClipRule.nonzero; this._opacity = 1f; this._fillOpacity = 1f; this._strokeOpacity = 1f; this._fillColor = new SVGColor(); this._strokeColor = new SVGColor(); this._strokeWidth = new SVGLength(1); this._strokeLineJoin = SVGStrokeLineJoinMethod.Miter; this._strokeLineCap = SVGStrokeLineCapMethod.Butt; this._fillRule = SVGFillRule.NonZero; this._miterLimit = new SVGLength(4); this._dashArray = null; this._dashOfset = new SVGLength(0); this._cssStyle = new Dictionary<string, Dictionary<string, string>>(); this._clipPathList = new List<List<Vector2>>(); this._linearGradList = new Dictionary<string, SVGLinearGradientElement>(); this._radialGradList = new Dictionary<string, SVGRadialGradientElement>(); this._conicalGradList = new Dictionary<string, SVGConicalGradientElement>(); }
public SVGPaintable(SVGPaintable inheritPaintable, Node node) { InitDefaults(); if(inheritPaintable != null) { this._visibility = inheritPaintable.visibility; this._display = inheritPaintable.display; this._clipRule = inheritPaintable.clipRule; this._viewport = inheritPaintable._viewport; this._fillRule = inheritPaintable._fillRule; this._cssStyle = inheritPaintable._cssStyle; this._clipPathList = CloneClipPathList(inheritPaintable._clipPathList); this._linearGradList = inheritPaintable._linearGradList; this._radialGradList = inheritPaintable._radialGradList; this._conicalGradList = inheritPaintable._conicalGradList; } Initialize(node.attributes); if(inheritPaintable != null) { if (IsFillX() == false) { if (inheritPaintable.IsLinearGradiantFill()) { this._gradientID = inheritPaintable.gradientID; } else if (inheritPaintable.IsRadialGradiantFill()) { this._gradientID = inheritPaintable.gradientID; } else this._fillColor = inheritPaintable.fillColor; } if (!IsStroke() && inheritPaintable.IsStroke()) { this._strokeColor = inheritPaintable.strokeColor; } if (_strokeLineCap == SVGStrokeLineCapMethod.Unknown) { _strokeLineCap = inheritPaintable.strokeLineCap; } if (_strokeLineJoin == SVGStrokeLineJoinMethod.Unknown) { _strokeLineJoin = inheritPaintable.strokeLineJoin; } if (isStrokeWidth == false) this._strokeWidth.NewValueSpecifiedUnits(inheritPaintable.strokeWidth); _opacity *= inheritPaintable._opacity; _fillOpacity *= inheritPaintable._fillOpacity; _strokeOpacity *= inheritPaintable._strokeOpacity; } ReadCSS(node); }