/// <summary>
        /// Initializes a new instance of the <see cref="WpfDrawingSettings"/> class
        /// with the specified initial drawing or rendering settings, a copy constructor.
        /// </summary>
        /// <param name="settings">
        /// This specifies the initial options for the rendering or drawing engine.
        /// </param>
        public WpfDrawingSettings(WpfDrawingSettings settings)
        {
            if (settings == null)
            {
                return;
            }

            _defaultFontName = settings._defaultFontName;
            _textAsGeometry  = settings._textAsGeometry;
            _optimizePath    = settings._optimizePath;
            _includeRuntime  = settings._includeRuntime;

            _neutralCulture = settings._neutralCulture;
            _culture        = settings._culture;

            _pixelWidth  = settings._pixelWidth;
            _pixelHeight = settings._pixelHeight;

            _ensureViewboxSize     = settings._ensureViewboxSize;
            _ensureViewboxPosition = settings._ensureViewboxPosition;
            _ignoreRootViewbox     = settings._ignoreRootViewbox;
            _wpfVisitors           = settings._wpfVisitors;

            _userCssFilePath      = settings._userCssFilePath;
            _userAgentCssFilePath = settings._userAgentCssFilePath;

            _properties = settings._properties;

            _fontSynch       = settings._fontSynch;
            _fontLocations   = settings._fontLocations;
            _fontFamilyNames = settings._fontFamilyNames;
            _fontFamilyMap   = settings._fontFamilyMap;
        }
        /// <overloads>
        /// Initializes a new instance of the <see cref="WpfDrawingSettings"/> class.
        /// </overloads>
        /// <summary>
        /// Initializes a new instance of the <see cref="WpfDrawingSettings"/> class
        /// with the default parameters and settings.
        /// </summary>
        public WpfDrawingSettings()
        {
            _defaultFontName = "Arial";
            _textAsGeometry  = false;
            _optimizePath    = true;
            _includeRuntime  = true;
            _neutralCulture  = CultureInfo.GetCultureInfo("en-us");
            _culture         = CultureInfo.GetCultureInfo("en-us");

            _pixelWidth  = -1;
            _pixelHeight = -1;

            _ensureViewboxSize     = false;
            _ensureViewboxPosition = true;
            _ignoreRootViewbox     = false;
            _wpfVisitors           = new WpfVisitors();
            _properties            = new Dictionary <string, object>(StringComparer.OrdinalIgnoreCase);

            _fontSynch       = new object();
            _fontLocations   = new HashSet <string>(StringComparer.OrdinalIgnoreCase);
            _fontFamilyNames = new Dictionary <string, string>(StringComparer.OrdinalIgnoreCase);
            _fontFamilyMap   = new Dictionary <string, IList <FontFamily> >(StringComparer.OrdinalIgnoreCase);
            _cssVariables    = new Dictionary <string, string>(StringComparer.OrdinalIgnoreCase);

            _dpiScale = DpiUtilities.GetSystemScale();
        }
Esempio n. 3
0
        /// <overloads>
        /// Initializes a new instance of the <see cref="WpfDrawingSettings"/> class.
        /// </overloads>
        /// <summary>
        /// Initializes a new instance of the <see cref="WpfDrawingSettings"/> class
        /// with the default parameters and settings.
        /// </summary>
        public WpfDrawingSettings()
        {
            _defaultFontName = "Arial Unicode MS";
            _textAsGeometry  = false;
            _optimizePath    = true;
            _includeRuntime  = true;
            _neutralCulture  = CultureInfo.GetCultureInfo("en-us");
            _culture         = CultureInfo.GetCultureInfo("en-us");

            _pixelWidth  = -1;
            _pixelHeight = -1;

            _ensureViewboxSize     = false;
            _ensureViewboxPosition = true;
            _ignoreRootViewbox     = false;
            _wpfVisitors           = new WpfVisitors();
        }
        /// <overloads>
        /// Initializes a new instance of the <see cref="WpfDrawingSettings"/> class.
        /// </overloads>
        /// <summary>
        /// Initializes a new instance of the <see cref="WpfDrawingSettings"/> class
        /// with the default parameters and settings.
        /// </summary>
        public WpfDrawingSettings()
        {
            _defaultFontName = "Arial";
            _textAsGeometry  = false;
            _optimizePath    = true;
            _includeRuntime  = true;
            _neutralCulture  = CultureInfo.GetCultureInfo("en-us");
            _culture         = CultureInfo.GetCultureInfo("en-us");

            _pixelWidth  = -1;
            _pixelHeight = -1;

            _ensureViewboxSize     = false;
            _ensureViewboxPosition = true;
            _ignoreRootViewbox     = false;
            _wpfVisitors           = new WpfVisitors();
            _properties            = new Dictionary <string, object>(StringComparer.OrdinalIgnoreCase);
        }