예제 #1
0
        public override void AssignAttribute(string attrName, string attrValue)
        {
            switch (attrName)
            {
            default:
                if (!AssignCommonAttribute(attrName, attrValue))
                {
                    throw new NotSupportedException();
                }
                break;

            case "x1":
                _spec.X1 = ParseGenericLength(attrValue);
                break;

            case "y1":
                _spec.Y1 = ParseGenericLength(attrValue);
                break;

            case "x2":
                _spec.X2 = ParseGenericLength(attrValue);
                break;

            case "y2":
                _spec.Y2 = ParseGenericLength(attrValue);
                break;

            case "gradientTransform":
                SvgParser.ParseTransform(attrValue, _spec);
                break;
            }
        }
예제 #2
0
        public override void AssignAttribute(string attrName, string attrValue)
        {
            switch (attrName)
            {
            default:
                if (!AssignCommonAttribute(attrName, attrValue))
                {
                    throw new NotSupportedException();
                }
                break;

            case "cx":
                _spec.CX = ParseGenericLength(attrValue);
                break;

            case "cy":
                _spec.CY = ParseGenericLength(attrValue);
                break;

            case "fx":
                _spec.FX = ParseGenericLength(attrValue);
                break;

            case "fy":
                _spec.FY = ParseGenericLength(attrValue);
                break;

            case "fr":
                _spec.FR = ParseGenericLength(attrValue);
                break;

            case "r":
                _spec.R = ParseGenericLength(attrValue);
                break;

            case "gradientTransform":
                SvgParser.ParseTransform(attrValue, _spec);
                break;

            case "gradientUnits":
                _spec.GradientUnits = ParseContentUnit(attrValue);
                break;
            }
        }