Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HeuristicLab.Problems.GrammaticalOptimization/SharpVectorModel/ClippingMaskingCompositing/SvgClipPathElement.cs @ 13825

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

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

File size: 3.0 KB
Line 
1// <developer>niklas@protocol7.com</developer>
2// <completed>100</completed>
3
4using System;
5using System.Xml;
6
7namespace SharpVectors.Dom.Svg
8{
9    public sealed class SvgClipPathElement : SvgTransformableElement, ISvgClipPathElement
10    {
11        #region Private Fields
12
13        private SvgTests svgTests;
14        private ISvgAnimatedEnumeration clipPathUnits;
15        private SvgExternalResourcesRequired svgExternalResourcesRequired;
16
17        #endregion
18
19        #region Constructors and Destructor
20
21        public SvgClipPathElement(string prefix, string localname, string ns, SvgDocument doc)
22      : base(prefix, localname, ns, doc)
23    {
24      svgExternalResourcesRequired = new SvgExternalResourcesRequired(this);
25      svgTests = new SvgTests(this);
26    }
27
28    #endregion
29
30        #region ISvgElement Members
31
32        /// <summary>
33        /// Gets a value indicating whether this SVG element is renderable.
34        /// </summary>
35        /// <value>
36        /// This is <see langword="'true"/> if the element is renderable; otherwise,
37        /// it is <see langword="false"/>.
38        /// </value>
39        public override bool IsRenderable
40        {
41            get
42            {
43                return false;
44            }
45        }
46
47        /// <summary>
48        /// Gets a value providing a hint on the rendering defined by this element.
49        /// </summary>
50        /// <value>
51        /// An enumeration of the <see cref="SvgRenderingHint"/> specifying the rendering hint.
52        /// This will always return <see cref="SvgRenderingHint.Clipping"/>
53        /// </value>
54        public override SvgRenderingHint RenderingHint
55        {
56            get
57            {
58                return SvgRenderingHint.Clipping;
59            }
60        }
61
62        #endregion
63
64        #region ISvgClipPathElement Members
65
66        public ISvgAnimatedEnumeration ClipPathUnits
67    {
68      get
69      {
70        if(clipPathUnits == null)
71        {
72          SvgUnitType clipPath = SvgUnitType.UserSpaceOnUse;
73          if (GetAttribute("clipPathUnits") == "objectBoundingBox")
74          {
75            clipPath = SvgUnitType.ObjectBoundingBox;
76          }
77
78          clipPathUnits = new SvgAnimatedEnumeration((ushort)clipPath);
79        }
80
81        return clipPathUnits;
82      }
83    }
84
85    #endregion
86
87        #region ISvgExternalResourcesRequired Members
88       
89        public ISvgAnimatedBoolean ExternalResourcesRequired
90    {
91      get
92      {
93        return svgExternalResourcesRequired.ExternalResourcesRequired;
94      }
95    }
96
97    #endregion
98
99        #region ISvgTests Members
100
101        public ISvgStringList RequiredFeatures
102    {
103      get { return svgTests.RequiredFeatures; }
104    }
105
106    public ISvgStringList RequiredExtensions
107    {
108      get { return svgTests.RequiredExtensions; }
109    }
110
111    public ISvgStringList SystemLanguage
112    {
113      get { return svgTests.SystemLanguage; }
114    }
115
116    public bool HasExtension(string extension)
117    {
118      return svgTests.HasExtension(extension);
119    }
120
121        #endregion
122  }
123}
Note: See TracBrowser for help on using the repository browser.