Пример #1
0
 private void AppendAll(ElementCollection elements, ElementCollection children, StringDictionary parentStyle)
 {
     foreach (var child in children)
     {
         if (!IsDisplayed(child))
         {
             continue;
         }
         if (child is G)
         {
             var outerGroup = elements.Append <Group>();
             var innerGroup = outerGroup.Children.Append <Group>();
             InitRecursively(outerGroup, innerGroup, (G)child, parentStyle);
             continue;
         }
         if (child is SvgPath)
         {
             var outerGroup = elements.Append <Group>();
             var innerGroup = outerGroup.Children.Append <Group>();
             Init(outerGroup, innerGroup, (SvgPath)child, parentStyle);
             continue;
         }
         if (child is UnsupportedElement)
         {
             _unsupportedElements.Add(child.ToString());
         }
     }
 }
 private void AppendAll(ElementCollection elements, ElementCollection children, StringDictionary parentStyle)
 {
     foreach (var child in children)
     {
         if (child is IStyleableElement && !IsDisplayed((IStyleableElement)child))
         {
             continue;
         }
         if (child is G)
         {
             InitRecursively(elements.Append <Group>(), (G)child, parentStyle);
             continue;
         }
         if (child is SvgPath)
         {
             Init(elements.Append <Group>(), (SvgPath)child, parentStyle);
             continue;
         }
         if (child is UnsupportedElement)
         {
             throw new UnsupportedFormatException($"Met unsupported element '{child}'.");
         }
     }
 }
 private void AppendAll(ElementCollection elements, ElementCollection children, StringDictionary parentStyle)
 {
     foreach (var child in children)
     {
         if (!IsDisplayed(child))
         {
             continue;
         }
         if (child is G)
         {
             InitRecursively(elements.Append<Group>(), (G)child, parentStyle);
             continue;
         }
         if (child is SvgPath)
         {
             Init(elements.Append<Group>(), (SvgPath)child, parentStyle);
             continue;
         }
         if (child is UnsupportedElement)
         {
             _unsupportedElements.Add(child.ToString());
         }
     }
 }
 private void AppendAll(ElementCollection elements, ElementCollection children, StringDictionary parentStyle)
 {
     foreach (var child in children)
     {
         if (child is IStyleableElement && !IsDisplayed((IStyleableElement)child))
         {
             continue;
         }
         if (child is G)
         {
             InitRecursively(elements.Append<Group>(), (G)child, parentStyle);
             continue;
         }
         if (child is SvgPath)
         {
             Init(elements.Append<Group>(), (SvgPath)child, parentStyle);
             continue;
         }
         if (child is UnsupportedElement)
         {
             throw new UnsupportedFormatException($"Met unsupported element '{child}'.");
         }
     }
 }