예제 #1
0
        private void WriteBaseRectangleVObjectAttributes(SvgElement svg, BaseRectangleVObject vObject)
        {
            WriteVObjectAttributes(svg, vObject);

            svg.CustomAttributes.Add(new SvgVoAttribute("text-wrapping-mode", vObject.TextWrappingMode.ToString().ToLowerInvariant()));
            svg.CustomAttributes.Add(new SvgVoAttribute("opacity", vObject.Opacity));
        }
예제 #2
0
        private void ReadBaseRectangleVObjectAttributes(BaseRectangleVObject vObject, SvgElement svg)
        {
            ReadVObjectAttributes(vObject, svg);

            foreach (var attr in svg.CustomAttributes.Where(attr => attr.NamespaceUri == XmlNamespace.AurigmaVectorObjects))
            {
                switch (attr.LocalName)
                {
                case "text-wrapping-mode":
                    vObject.TextWrappingMode = SvgAttribute.ParseEnumAttribute(attr.GetValue(),
                                                                               TextWrappingMode.None);
                    break;

                case "opacity":
                    vObject.Opacity = SvgAttribute.ParseFloatAttribute(attr.GetValue(), 1.0f);
                    break;
                }
            }
        }
 public BaseRectangleVObjectData(BaseRectangleVObject obj)
     : base(obj)
 {
     TWM = obj.TextWrappingMode;
     O   = obj.Opacity;
 }