//--------------------------------------------------------------------------------------------------

        #endregion

        #region Importer

        bool _Import(Stream svgStream, out IDictionary <int, Pnt2d> points, out IDictionary <int, SketchSegment> segments)
        {
            points   = null;
            segments = null;

            _Document = new SvgDocument();
            if (!_Document.ReadFromStream(svgStream))
            {
                Messages.Error("SVG data has an invalid format.");
                _Document = null;
                return(false);
            }

            // Iterate through children
            foreach (var child in _Document.Children)
            {
                _ImportElement(child);
            }

            if (!_Segments.Any())
            {
                Messages.Error("Could not find any usable elements in SVG data.");
                return(false);
            }

            points   = _Points;
            segments = _Segments.ToIndexedDictionary();

            return(true);
        }