Ejemplo n.º 1
0
        /// <summary>
        /// Creates a new SvgGraphics
        /// <para>
        /// Note that our current documentation tool, NDoc, does not handle overloaded methods well, so if you are reading the .chm file, please read the documentation
        /// for the particular exact method you want to use.  
        /// </para>
        /// </summary>
        public SvgGraphics()
        {
            _root = new SvgSvgElement();
            _root.Id = "SvgGdi_output";

            _bg = new SvgRectElement(0, 0, "100%", "100%");
            _bg.Style.Set("fill", new SvgColor(Color.FromName("Control")));
            _bg.Id = "background";
            _root.AddChild(_bg);

            _topgroup = new SvgGroupElement("root_group");
            _topgroup.Style.Set("shape-rendering", "crispEdges");
            _cur = _topgroup;
            _root.AddChild(_topgroup);

            _defs = new SvgDefsElement("clips_hatches_and_gradients");
            _root.AddChild(_defs);

            _transforms = new MatrixStack();
        }
Ejemplo n.º 2
0
        ///<summary>
        /// Constructs a new <c>SVGGraphics</c> object.
        ///</summary>
        public SvgGraphics(int width, int height)
        {
            root = new SvgSvgElement(width, height);

            //bg = new SvgRectElement(0, 0, "100%", "100%");
            //bg.Style.Set("fill", new SvgColor(Color.FromName("Control")));
            //bg.Id = "background";
            //root.AddChild(bg);

            topgroup = new SvgGroupElement();
            topgroup.Style.Set("shape-rendering", "crispEdges");
            cur = topgroup;
            root.AddChild(topgroup);

            defs = new SvgDefsElement();
            root.AddChild(defs);

            transforms = new MatrixStack();
        }