Ejemplo n.º 1
0
    protected SVGGradientElement(SVGParser xmlImp, Dictionary<string, string> attrList)
    {
        _attrList = attrList;
        _xmlImp = xmlImp;
        _stopList = new List<SVGStopElement>();
        _id = _attrList.GetValue("id");
        _gradientUnits = SVGGradientUnit.ObjectBoundingBox;
        if (_attrList.GetValue("gradiantUnits") == "userSpaceOnUse")
        {
            _gradientUnits = SVGGradientUnit.UserSpaceOnUse;
        }

        //------
        // TODO: It's probably a bug that the value is not innoculated for CaSe
        // VaRiAtIoN in GetValue, below:
        _spreadMethod = SVGSpreadMethod.Pad;
        if (_attrList.GetValue("spreadMethod") == "reflect")
        {
            _spreadMethod = SVGSpreadMethod.Reflect;
        }
        else if (_attrList.GetValue("spreadMethod") == "repeat")
        {
            _spreadMethod = SVGSpreadMethod.Repeat;
        }

        GetElementList();
    }
Ejemplo n.º 2
0
        public SVGGradientElement(SVGParser xmlImp, Node node)
        {
            _attrList      = node.attributes;
            _xmlImp        = xmlImp;
            _stopList      = new List <SVGStopElement>();
            _id            = _attrList.GetValue("id");
            _gradientUnits = SVGGradientUnit.ObjectBoundingBox;
            if (_attrList.GetValue("gradiantUnits") == "userSpaceOnUse")
            {
                _gradientUnits = SVGGradientUnit.UserSpaceOnUse;
            }

            _gradientTransform = new SVGTransformList(_attrList.GetValue("gradientTransform"));

            //------
            // TODO: It's probably a bug that the value is not innoculated for CaSe
            // VaRiAtIoN in GetValue, below:
            _spreadMethod = SVGSpreadMethod.Pad;
            if (_attrList.GetValue("spreadMethod") == "reflect")
            {
                _spreadMethod = SVGSpreadMethod.Reflect;
            }
            else if (_attrList.GetValue("spreadMethod") == "repeat")
            {
                _spreadMethod = SVGSpreadMethod.Repeat;
            }

            if (node is BlockOpenNode)
            {
                GetElementList();
            }
        }
Ejemplo n.º 3
0
    protected SVGGradientElement(SVGParser xmlImp, Dictionary <string, string> attrList)
    {
        _attrList      = attrList;
        _xmlImp        = xmlImp;
        _stopList      = new List <SVGStopElement>();
        _id            = _attrList.GetValue("id");
        _gradientUnits = SVGGradientUnit.ObjectBoundingBox;
        if (_attrList.GetValue("gradiantUnits") == "userSpaceOnUse")
        {
            _gradientUnits = SVGGradientUnit.UserSpaceOnUse;
        }

        //------
        // TODO: It's probably a bug that the value is not innoculated for CaSe VaRiAtIoN in GetValue, below:
        _spreadMethod = SVGSpreadMethod.Pad;
        if (_attrList.GetValue("spreadMethod") == "reflect")
        {
            _spreadMethod = SVGSpreadMethod.Reflect;
        }
        else if (_attrList.GetValue("spreadMethod") == "repeat")
        {
            _spreadMethod = SVGSpreadMethod.Repeat;
        }

        GetElementList();
    }
        public SVGGradientElement(SVGParser xmlImp, Node node)
        {
            _attrList = node.attributes;
            _xmlImp = xmlImp;
            _stopList = new List<SVGStopElement>();
            _id = _attrList.GetValue("id");
            _gradientUnits = SVGGradientUnit.ObjectBoundingBox;
            if (_attrList.GetValue("gradiantUnits") == "userSpaceOnUse")
            {
                _gradientUnits = SVGGradientUnit.UserSpaceOnUse;
            }

            _gradientTransform = new SVGTransformList(_attrList.GetValue("gradientTransform"));

            //------
            // TODO: It's probably a bug that the value is not innoculated for CaSe
            // VaRiAtIoN in GetValue, below:
            _spreadMethod = SVGSpreadMethod.Pad;
            if (_attrList.GetValue("spreadMethod") == "reflect")
            {
                _spreadMethod = SVGSpreadMethod.Reflect;
            } else if (_attrList.GetValue("spreadMethod") == "repeat")
            {
                _spreadMethod = SVGSpreadMethod.Repeat;
            }

            if(node is BlockOpenNode)
            {
                GetElementList();
            }
        }
Ejemplo n.º 5
0
    private void Initialize()
    {
        _x1 = _linearGradElement.x1.value;
        _y1 = _linearGradElement.y1.value;
        _x2 = _linearGradElement.x2.value;
        _y2 = _linearGradElement.y2.value;

        _stopColorList  = new List <Color>();
        _stopOffsetList = new List <float>();
        _spreadMethod   = _linearGradElement.spreadMethod;

        GetStopList();
        _vitriOffset = 0;
        PreColorProcess(_vitriOffset);
    }
Ejemplo n.º 6
0
    private void Initialize()
    {
        _cx = _radialGradElement.cx.value;
        _cy = _radialGradElement.cy.value;
        _r  = _radialGradElement.r.value;
        _fx = _radialGradElement.fx.value;
        _fy = _radialGradElement.fy.value;

        _stopColorList  = new List <Color>();
        _stopOffsetList = new List <float>();
        _spreadMethod   = _radialGradElement.spreadMethod;

        GetStopList();
        FixF();
        _vitriOffset = 0;
        PreColorProcess(_vitriOffset);
    }
Ejemplo n.º 7
0
    private void Initialize()
    {
        _x1 = _linearGradElement.x1.value;
        _y1 = _linearGradElement.y1.value;
        _x2 = _linearGradElement.x2.value;
        _y2 = _linearGradElement.y2.value;

        _stopColorList = new List<Color>();
        _stopOffsetList = new List<float>();
        _spreadMethod = _linearGradElement.spreadMethod;

        GetStopList();
        _vitriOffset = 0;
        PreColorProcess(_vitriOffset);
    }
    /*********************************************************************************/
    private void Initialize()
    {
        _cx = _radialGradElement.cx.value;
        _cy = _radialGradElement.cy.value;
        _r = _radialGradElement.r.value;
        _fx = _radialGradElement.fx.value;
        _fy = _radialGradElement.fy.value;

        _stopColorList = new List<Color>();
        _stopOffsetList = new List<float>();
        _spreadMethod = _radialGradElement.spreadMethod;

        GetStopList();
        FixF();
        _vitriOffset = 0;
        PreColorProcess(_vitriOffset);
    }