コード例 #1
0
 private static XElement ToXml(TextElement textElement)
 {
     return new XElement("TextElement",
         new XAttribute("fontName", textElement.DrawingFont.Name),
         new XAttribute("text", textElement.Text),
         new XAttribute("vector", textElement.Position),
         new XAttribute("color", textElement.Color));
 }
コード例 #2
0
        public TextElement AddText(DrawingFont drawingFont, string text, Vector vector, Color color)
        {
            var textElement = new TextElement(drawingFont, text, vector, color);
            this.elements.Add(textElement);

            return textElement;
        }