[12762] | 1 | using System;
|
---|
| 2 | using System.Xml;
|
---|
| 3 |
|
---|
| 4 | using SharpVectors.Text;
|
---|
| 5 |
|
---|
| 6 | namespace SharpVectors.Dom.Svg
|
---|
| 7 | {
|
---|
| 8 | /// <summary>
|
---|
| 9 | /// The SvgSwitchElement interface corresponds to the 'switch' element.
|
---|
| 10 | /// </summary>
|
---|
| 11 | public sealed class SvgSwitchElement : SvgTransformableElement, ISvgSwitchElement
|
---|
| 12 | {
|
---|
| 13 | #region Private Fields
|
---|
| 14 |
|
---|
| 15 | private SvgTests svgTests;
|
---|
| 16 | private SvgExternalResourcesRequired svgExternalResourcesRequired;
|
---|
| 17 |
|
---|
| 18 | #endregion
|
---|
| 19 |
|
---|
| 20 | #region Constructors and Destructor
|
---|
| 21 |
|
---|
| 22 | public SvgSwitchElement(string prefix, string localname, string ns, SvgDocument doc)
|
---|
| 23 | : base(prefix, localname, ns, doc)
|
---|
| 24 | {
|
---|
| 25 | svgExternalResourcesRequired = new SvgExternalResourcesRequired(this);
|
---|
| 26 | svgTests = new SvgTests(this);
|
---|
| 27 | }
|
---|
| 28 |
|
---|
| 29 | #endregion
|
---|
| 30 |
|
---|
| 31 | #region ISvgElement Members
|
---|
| 32 |
|
---|
| 33 | /// <summary>
|
---|
| 34 | /// Gets a value providing a hint on the rendering defined by this element.
|
---|
| 35 | /// </summary>
|
---|
| 36 | /// <value>
|
---|
| 37 | /// An enumeration of the <see cref="SvgRenderingHint"/> specifying the rendering hint.
|
---|
| 38 | /// This will always return <see cref="SvgRenderingHint.Containment"/>
|
---|
| 39 | /// </value>
|
---|
| 40 | public override SvgRenderingHint RenderingHint
|
---|
| 41 | {
|
---|
| 42 | get
|
---|
| 43 | {
|
---|
| 44 | return SvgRenderingHint.Containment;
|
---|
| 45 | }
|
---|
| 46 | }
|
---|
| 47 |
|
---|
| 48 | #endregion
|
---|
| 49 |
|
---|
| 50 | #region ISvgExternalResourcesRequired Members
|
---|
| 51 |
|
---|
| 52 | public ISvgAnimatedBoolean ExternalResourcesRequired
|
---|
| 53 | {
|
---|
| 54 | get
|
---|
| 55 | {
|
---|
| 56 | return svgExternalResourcesRequired.ExternalResourcesRequired;
|
---|
| 57 | }
|
---|
| 58 | }
|
---|
| 59 |
|
---|
| 60 | #endregion
|
---|
| 61 |
|
---|
| 62 | #region ISvgTests Members
|
---|
| 63 |
|
---|
| 64 | public ISvgStringList RequiredFeatures
|
---|
| 65 | {
|
---|
| 66 | get { return svgTests.RequiredFeatures; }
|
---|
| 67 | }
|
---|
| 68 |
|
---|
| 69 | public ISvgStringList RequiredExtensions
|
---|
| 70 | {
|
---|
| 71 | get { return svgTests.RequiredExtensions; }
|
---|
| 72 | }
|
---|
| 73 |
|
---|
| 74 | public ISvgStringList SystemLanguage
|
---|
| 75 | {
|
---|
| 76 | get { return svgTests.SystemLanguage; }
|
---|
| 77 | }
|
---|
| 78 |
|
---|
| 79 | public bool HasExtension(string extension)
|
---|
| 80 | {
|
---|
| 81 | return svgTests.HasExtension(extension);
|
---|
| 82 | }
|
---|
| 83 |
|
---|
| 84 | #endregion
|
---|
| 85 | }
|
---|
| 86 | }
|
---|