Document model.
Inheritance: XSelectable
Exemplo n.º 1
0
        /// <inheritdoc/>
        void IProjectExporter.Save(string path, XDocument document)
        {
            var template = new Template();
            var drawing = new Drawing(template);

            foreach (var container in document.Pages)
            {
                Add(drawing, container);
            }

            drawing.Save(path);
            ClearCache(isZooming: false);
        }
Exemplo n.º 2
0
        /// <inheritdoc/>
        void IProjectExporter.Save(string path, XDocument document)
        {
            using (var stream = new SKFileWStream(path))
            {
                using (var pdf = SKDocument.CreatePdf(stream, _targetDpi))
                {
                    foreach (var container in document.Pages)
                    {
                        Add(pdf, container);
                    }

                    pdf.Close();
                    _renderer.ClearCache(isZooming: false);
                }
            }
        }
Exemplo n.º 3
0
        private void Remove(XDocument document)
        {
            if (document == null)
                return;

            document.PropertyChanged -= ObserveDocument;

            if (document.Pages != null)
            {
                foreach (var container in document.Pages)
                {
                    Remove(container);
                }
            }
        }
Exemplo n.º 4
0
 public void Pages_Not_Null()
 {
     var target = new XDocument();
     Assert.NotNull(target.Pages);
 }
Exemplo n.º 5
0
 public void Inherits_From_Selectable()
 {
     var target = new XDocument();
     Assert.True(target is XSelectable);
 }