/// <summary>
 /// Converts an object into its XML representation.
 /// </summary>
 /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"/> stream to which the object is serialized. </param>
 public void WriteXml(XmlWriter writer)
 {
     writer.WriteElementString("BottomLeft", BottomLeft.ToString());
     writer.WriteElementString("BottomRight", BottomRight.ToString());
     writer.WriteElementString("TopLeft", TopLeft.ToString());
     writer.WriteElementString("TopRight", TopRight.ToString());
 }
Пример #2
0
        protected override void ExportGeometry(XElement xParent)
        {
            var nfi = new NumberFormatInfo();

            nfi.NumberDecimalSeparator = ".";

            var tmpDoc = new XDocument(new XElement("TextGeometry",
                                                    new XAttribute("TopLeft", TopLeft.ToString(nfi)),
                                                    new XAttribute("BottomRight", BottomRight.ToString(nfi)),
                                                    new XAttribute("Text", Text),
                                                    new XAttribute("FontFamily", FontFamily),
                                                    new XAttribute("FontStyle", FontStyle),
                                                    new XAttribute("FontWeight", FontWeight),
                                                    new XAttribute("TextSize", TextSize.ToString(nfi)),
                                                    new XAttribute("Alignment", Alignment),
                                                    new XAttribute("Trimming", Trimming)));

            xParent.Add(new XComment(tmpDoc.Root.ToString()));

            if (Path.Data is GeometryGroup)
            {
                ExportGeometryGroup(xParent, Path.Data as GeometryGroup);
            }
        }
Пример #3
0
 public override string ToString()
 {
     return(string.Format(CultureInfo.InvariantCulture, "[{0}][{1}]", TopLeft.ToString(), BottomRight.ToString()));
 }