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 | |
---|
1 | using System;
|
---|
2 | using System.Diagnostics;
|
---|
3 | using System.Drawing;
|
---|
4 | using System.Drawing.Drawing2D;
|
---|
5 | using System.Text.RegularExpressions;
|
---|
6 |
|
---|
7 | using SharpVectors.Dom.Svg;
|
---|
8 |
|
---|
9 | namespace 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.