Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HeuristicLab.Problems.GrammaticalOptimization/SharpVectorRenderingWpf/Wpf/WpfFill.cs @ 13777

Last change on this file since 13777 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.Xml;
3using System.Linq;
4using System.Text;
5using System.Windows;
6using System.Windows.Media;
7using System.Collections.Generic;
8
9using SharpVectors.Dom.Svg;
10using SharpVectors.Dom.Css;
11
12namespace SharpVectors.Renderers.Wpf
13{
14    public abstract class WpfFill : DependencyObject
15    {
16        #region Constructors and Destructor
17
18        protected WpfFill()
19        {
20        }
21
22        #endregion
23
24        #region Public Methods
25
26        public abstract Brush GetBrush(WpfDrawingContext context);
27
28        public static WpfFill CreateFill(SvgDocument document, string absoluteUri)
29        {
30            XmlNode node = document.GetNodeByUri(absoluteUri);
31
32            SvgGradientElement gradientNode = node as SvgGradientElement;
33            if (gradientNode != null)
34            {
35                return new WpfGradientFill(gradientNode);
36            }
37
38            SvgPatternElement patternNode = node as SvgPatternElement;
39            if (patternNode != null)
40            {
41                return new WpfPatternFill(patternNode);
42            }
43
44            return null;
45        }
46
47        #endregion
48    }
49}
Note: See TracBrowser for help on using the repository browser.