예제 #1
0
 public SVG AddSvg(SVG svg)
 {
     if (svg.IsRoot)
     {
         throw new Exception("SVG: must have exactly one root");
     }
     return(AddDrawing(svg));
 }
예제 #2
0
 public static Image Make(SVG root)
 {
     if (!root.IsRoot)
     {
         throw new ArgumentException("no root");
     }
     return(new Image(root)
     {
         Xml = new XDocument(new XDeclaration("1.0", "utf-8", "no"), root.ToSvg())
     });
 }
예제 #3
0
 Image(SVG root) => Root = root;