/// <inheritdoc/> void IFileWriter.Save(string path, object item, object options) { if (string.IsNullOrEmpty(path) || item == null) return; var ic = options as IImageCache; if (options == null) return; var renderer = new SkiaRenderer(true, 96.0); renderer.State.DrawShapeState.Flags = ShapeStateFlags.Printable; renderer.State.ImageCache = ic; var presenter = new ExportPresenter(); IProjectExporter exporter = new SvgExporter(renderer, presenter); if (item is XContainer) { exporter.Save(path, item as XContainer); } else if (item is XDocument) { throw new NotSupportedException("Saving documents as svg drawing is not supported."); } else if (item is XProject) { throw new NotSupportedException("Saving projects as svg drawing is not supported."); } }