예제 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="FileSvgConverter"/> class
 /// with the specified drawing or rendering settings and the saving options.
 /// </summary>
 /// <param name="saveXaml">
 /// This specifies whether to save result object tree in XAML file.
 /// </param>
 /// <param name="saveZaml">
 /// This specifies whether to save result object tree in ZAML file. The
 /// ZAML is simply a G-Zip compressed XAML format, similar to the SVGZ.
 /// </param>
 /// <param name="settings">
 /// This specifies the settings used by the rendering or drawing engine.
 /// If this is <see langword="null"/>, the default settings is used.
 /// </param>
 public FileSvgConverter(bool saveXaml, bool saveZaml,
     WpfDrawingSettings settings)
     : base(saveXaml, saveZaml, settings)
 {
     _wpfRenderer = new WpfDrawingRenderer(this.DrawingSettings);
     _wpfWindow   = new WpfSvgWindow(640, 480, _wpfRenderer);
 }
예제 #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="StreamSvgConverter"/> class
        /// with the specified drawing or rendering settings and the saving options.
        /// </summary>
        /// <param name="saveXaml">
        /// This specifies whether to save result object tree in image file.
        /// </param>
        /// <param name="saveZaml">
        /// This specifies whether to save result object tree in ZAML file. The
        /// ZAML is simply a G-Zip compressed image format, similar to the SVGZ.
        /// </param>
        /// <param name="settings">
        /// This specifies the settings used by the rendering or drawing engine.
        /// If this is <see langword="null"/>, the default settings is used.
        /// </param>
        public StreamSvgConverter(bool saveXaml, bool saveZaml,
            WpfDrawingSettings settings)
            : base(saveXaml, saveZaml, settings)
        {
            _encoderType     = ImageEncoderType.PngBitmap;

            _wpfRenderer = new WpfDrawingRenderer(this.DrawingSettings);
            _wpfWindow   = new WpfSvgWindow(640, 480, _wpfRenderer);
        }
예제 #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="FileSvgConverter"/> class
        /// with the specified drawing or rendering settings, the saving options
        /// and the working directory.
        /// </summary>
        /// <param name="saveXaml">
        /// This specifies whether to save result object tree in XAML file.
        /// </param>
        /// <param name="saveZaml">
        /// This specifies whether to save result object tree in ZAML file. The
        /// ZAML is simply a G-Zip compressed XAML format, similar to the SVGZ.
        /// </param>
        /// <param name="workingDir">
        /// The working directory, where converted outputs are saved.
        /// </param>
        /// <param name="settings">
        /// This specifies the settings used by the rendering or drawing engine.
        /// If this is <see langword="null"/>, the default settings is used.
        /// </param>
        public FileSvgReader(bool saveXaml, bool saveZaml,
            DirectoryInfo workingDir, WpfDrawingSettings settings)
            : base(saveXaml, saveZaml, settings)
        {
            _wpfRenderer = new WpfDrawingRenderer(this.DrawingSettings);
            _wpfWindow   = new WpfSvgWindow(640, 480, _wpfRenderer);

            _workingDir = workingDir;

            if (_workingDir != null)
            {
                if (!_workingDir.Exists)
                {
                    _workingDir.Create();
                }
            }
        }