Beispiel #1
0
 public void ReadFromElement(SvgStyledTransformedElement el)
 {
     this._href    = (string)el["xlink:href"];
     this._role    = (string)el["xlink:role"];
     this._arcrole = (string)el["xlink:arcrole"];
     this._title   = (string)el["xlink:title"];
     this._show    = (string)el["xlink:show"];
 }
Beispiel #2
0
 public void WriteToElement(SvgStyledTransformedElement el)
 {
     el["xlink:href"]    = this._href;
     el["xlink:role"]    = this._role;
     el["xlink:arcrole"] = this._arcrole;
     el["xlink:title"]   = this._title;
     el["xlink:show"]    = this._show;
 }
Beispiel #3
0
 public void WriteToElement(SvgStyledTransformedElement el)
 {
     el["xlink:href"] = Href;
     //if (_type != "simple") el["xlink:type"] = _type;
     el["xlink:role"]    = Role;
     el["xlink:arcrole"] = Arcrole;
     el["xlink:title"]   = Title;
     el["xlink:show"]    = Show;
     //if (_type != "onLoad") el["xlink:actuate"] = _actuate;
 }
Beispiel #4
0
        public void ReadFromElement(SvgStyledTransformedElement el)
        {
            Href    = (string)el["xlink:href"];
            Role    = (string)el["xlink:role"];
            Arcrole = (string)el["xlink:arcrole"];
            Title   = (string)el["xlink:title"];
            Show    = (string)el["xlink:show"];

            //ignore the possibility of setting type and actuate for now
        }
Beispiel #5
0
 public void WriteToElement(SvgStyledTransformedElement el)
 {
     el["xlink:href"] = _href;
     //if (_type != "simple") el["xlink:type"] = _type;
     el["xlink:role"] = _role;
     el["xlink:arcrole"] = _arcrole;
     el["xlink:title"] = _title;
     el["xlink:show"] = _show;
     //if (_type != "onLoad") el["xlink:actuate"] = _actuate;
 }
Beispiel #6
0
        public void ReadFromElement(SvgStyledTransformedElement el)
        {
            _href = (string)el["xlink:href"];
            _role = (string)el["xlink:role"];
            _arcrole = (string)el["xlink:arcrole"];
            _title = (string)el["xlink:title"];
            _show = (string)el["xlink:show"];

            //ignore the possibility of setting type and actuate for now
        }
Beispiel #7
0
 public SvgXRef(SvgStyledTransformedElement el)
 {
     ReadFromElement(el);
 }
Beispiel #8
0
 public SvgXRef(SvgStyledTransformedElement el)
 {
     ReadFromElement(el);
 }
Beispiel #9
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();
        }
Beispiel #10
0
 /// <summary>
 /// Implemented, but returns null as SVG has a proper scenegraph, unlike GDI+.  The effect of calling <c>BeginContainer</c> is to create a new SVG group
 /// and apply transformations etc to produce the effect that a GDI+ container would produce.
 /// </summary>
 public System.Drawing.Drawing2D.GraphicsContainer BeginContainer()
 {
     SvgGroupElement gr = new SvgGroupElement();
     _cur.AddChild(gr);
     _cur = gr;
     _cur.Id += "_BeginContainer";
     _transforms.Push();
     return null;
 }
Beispiel #11
0
        /// <summary>
        /// The effect of calling this method is to pop out of the closest SVG group.  This simulates restoring GDI+ state from a <c>GraphicsContainer</c>
        /// </summary>
        public void EndContainer(GraphicsContainer container)
        {
            if(_cur == _topgroup)
                return;

            _cur = (SvgStyledTransformedElement)_cur.Parent;

            _transforms.Pop();
        }
        ///<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();
        }
 /// <summary>
 /// Implemented, but returns null as SVG has a proper scenegraph, unlike GDI+.  The effect of calling <c>BeginContainer</c> is to create a new SVG group
 /// and apply transformations etc to produce the effect that a GDI+ container would produce.
 /// </summary>
 public GraphicsContainer BeginContainer()
 {
     var gr = new SvgGroupElement();
     cur.AddChild(gr);
     cur = gr;
     cur.Id += "_BeginContainer";
     transforms.Push();
     return null;
 }
        /// <summary>
        /// The effect of calling this method is to pop out of the closest SVG group.  This simulates restoring GDI+ state from a <c>GraphicsContainer</c>
        /// </summary>
        public void EndContainer(GraphicsContainer container)
        {
            if (cur == topgroup)
            {
                return;
            }

            cur = (SvgStyledTransformedElement) cur.Parent;

            transforms.Pop();
        }