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)); }
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; }