Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HeuristicLab.Problems.GrammaticalOptimization/SharpVectorRenderingGdi/Gdi/GdiRootRendering.cs @ 13348

Last change on this file since 13348 was 12762, checked in by aballeit, 9 years ago

#2283 GUI updates, Tree-chart, MCTS Version 2 (prune leaves)

File size: 1.2 KB
Line 
1using System;
2using System.Diagnostics;
3using System.Drawing;
4using System.Drawing.Drawing2D;
5using System.Text.RegularExpressions;
6
7using SharpVectors.Dom.Svg;
8
9namespace SharpVectors.Renderers.Gdi
10{
11  /// <summary>
12  /// Summary description for SvgElementGraphicsNode.
13  /// </summary>
14  public sealed class GdiRootRendering : GdiRendering
15  {
16        #region Constructor and Destructor
17   
18        public GdiRootRendering(SvgElement element)
19            : base(element)
20    {
21    }
22
23        #endregion
24
25        #region Public Methods
26
27        public override void Render(GdiGraphicsRenderer renderer)
28    {
29            GdiGraphicsWrapper graphics = renderer.GraphicsWrapper;
30
31      SvgSvgElement svgElm = (SvgSvgElement) element;
32
33      float x      = (float)svgElm.X.AnimVal.Value;
34      float y      = (float)svgElm.Y.AnimVal.Value;
35      float width  = (float)svgElm.Width.AnimVal.Value;
36      float height = (float)svgElm.Height.AnimVal.Value;
37
38      RectangleF elmRect = new RectangleF(x, y, width, height);
39
40            //if (element.ParentNode is SvgElement)
41            //{
42            //    // TODO: should it be moved with x and y?
43            //}
44
45      FitToViewbox(graphics, elmRect);
46    }
47
48        #endregion
49  }
50}
Note: See TracBrowser for help on using the repository browser.