From 21f32e3434c6ff9901bc6a9d6cfde95d3033196e Mon Sep 17 00:00:00 2001 From: Rich Date: Wed, 19 May 2010 14:55:31 +0000 Subject: [PATCH] Removed SvgRtf --- PROMS/Volian.Svg.Library/Graphics.cs | 34 +-- PROMS/Volian.Svg.Library/SvgGroup.cs | 2 +- PROMS/Volian.Svg.Library/SvgRtf.cs | 304 +++++++++++++-------------- 3 files changed, 170 insertions(+), 170 deletions(-) diff --git a/PROMS/Volian.Svg.Library/Graphics.cs b/PROMS/Volian.Svg.Library/Graphics.cs index 4404e37b..0b04d26b 100644 --- a/PROMS/Volian.Svg.Library/Graphics.cs +++ b/PROMS/Volian.Svg.Library/Graphics.cs @@ -130,23 +130,23 @@ namespace Volian.Svg.Library graphics.DrawRectangle(pen, scale.X(X),scale.Y(Y), scale.M(Width), scale.M(Height)); } } - public partial class SvgRtf : SvgShapePart - { - //private static float _Factor = 1.085F; // 20 point Arial Font - public override void Draw(System.Drawing.Graphics graphics, SvgScale scale, Svg mySvg, SvgPartInheritance myParent) - { - SetupInheritance(myParent.MyInheritedSettings); - _MyFontSettings.Scale = scale.M(1F); - } - private float YAdjustment(Graphics gr, Font fnt) - { - int yAsc = fnt.FontFamily.GetCellAscent(fnt.Style); - int yLS = fnt.FontFamily.GetLineSpacing(fnt.Style); - float gth = fnt.GetHeight(gr); - float fAsc = (yAsc * gth) / yLS; - return -fAsc; - } - } + //public partial class SvgRtf : SvgShapePart + //{ + // //private static float _Factor = 1.085F; // 20 point Arial Font + // public override void Draw(System.Drawing.Graphics graphics, SvgScale scale, Svg mySvg, SvgPartInheritance myParent) + // { + // SetupInheritance(myParent.MyInheritedSettings); + // _MyFontSettings.Scale = scale.M(1F); + // } + // private float YAdjustment(Graphics gr, Font fnt) + // { + // int yAsc = fnt.FontFamily.GetCellAscent(fnt.Style); + // int yLS = fnt.FontFamily.GetLineSpacing(fnt.Style); + // float gth = fnt.GetHeight(gr); + // float fAsc = (yAsc * gth) / yLS; + // return -fAsc; + // } + //} public partial class SvgText : SvgShapePart { //private static float _Factor = 1.085F; // 20 point Arial Font diff --git a/PROMS/Volian.Svg.Library/SvgGroup.cs b/PROMS/Volian.Svg.Library/SvgGroup.cs index 91a5f79a..69a49907 100644 --- a/PROMS/Volian.Svg.Library/SvgGroup.cs +++ b/PROMS/Volian.Svg.Library/SvgGroup.cs @@ -32,7 +32,7 @@ namespace Volian.Svg.Library #region Parts // SVG Parts SvgParts _SvgParts = new SvgParts(); - [XmlElement("foreignObject", typeof(SvgRtf))] + //[XmlElement("foreignObject", typeof(SvgRtf))] [XmlElement("use", typeof(SvgUse))] [XmlElement("image", typeof(SvgImage))] [XmlElement("text", typeof(SvgText))] diff --git a/PROMS/Volian.Svg.Library/SvgRtf.cs b/PROMS/Volian.Svg.Library/SvgRtf.cs index c3996d1f..a219ae44 100644 --- a/PROMS/Volian.Svg.Library/SvgRtf.cs +++ b/PROMS/Volian.Svg.Library/SvgRtf.cs @@ -8,157 +8,157 @@ using System.ComponentModel; namespace Volian.Svg.Library { - public partial class SvgRtf : SvgShapePart - { - #region ctor - public SvgRtf() { ;} - public SvgRtf(PointF location, float width, string rtf, Font font, Color fillColor) - { - _X.Value = location.X; - _Y.Value = location.Y; - _Width.Value = width; - Rtf = rtf; - Font = font; - FillColor = fillColor; - LineColor = Color.Empty; - LineWidth = new SvgMeasurement(0); - } - #endregion - #region Location - private SvgMeasurement _X = new SvgMeasurement(); - [XmlIgnore] - public SvgMeasurement X - { - get { return _X; } - set { _X = value; } - } - [XmlAttribute("x")] - [Browsable(false)] - [EditorBrowsable(EditorBrowsableState.Never)] - public string X_XmlSurrogate - { - get { return SvgXmlConverter.GetString(_X); } - set { _X = SvgXmlConverter.GetObject(value); } - } - private SvgMeasurement _Y = new SvgMeasurement(); - [XmlIgnore] - public SvgMeasurement Y - { - get { return _Y; } - set { _Y = value; } - } - [XmlAttribute("y")] - [Browsable(false)] - [EditorBrowsable(EditorBrowsableState.Never)] - public string Y_XmlSurrogate - { - get { return SvgXmlConverter.GetString(_Y); } - set { _Y = SvgXmlConverter.GetObject(value); } - } - #endregion - #region Size - private SvgMeasurement _Width = new SvgMeasurement(); - [XmlIgnore] - public SvgMeasurement Width - { - get { return _Width; } - set { _Width = value; } - } - [XmlAttribute("width")] - [Browsable(false)] - [EditorBrowsable(EditorBrowsableState.Never)] - public string Width_WidthmlSurrogate - { - get { return SvgXmlConverter.GetString(_Width); } - set { _Width = SvgXmlConverter.GetObject(value); } - } - private SvgMeasurement _Height = new SvgMeasurement(); - [XmlIgnore] - public SvgMeasurement Height - { - get { return _Height; } - set { _Height = value; } - } - [XmlAttribute("height")] - [Browsable(false)] - [EditorBrowsable(EditorBrowsableState.Never)] - public string Height_XmlSurrogate - { - get { return SvgXmlConverter.GetString(_Height); } - set { _Height = SvgXmlConverter.GetObject(value); } - } - #endregion - #region Rtf - private string _Rtf; - [XmlText()] - public string Rtf - { - get { return _Rtf; } - set { _Rtf = value; } - } - #endregion - #region Required Extensions - private string _RequiredExtensions = "http://Volian.Com/EmbeddedRTF"; - [Browsable(false)] - [EditorBrowsable(EditorBrowsableState.Never)] - [XmlAttribute("requiredExtensions")] - public string RequiredExtensions - { - get { return _RequiredExtensions; } - set { _RequiredExtensions = value; } - } - #endregion - #region Font Settings - private SvgFontSettings _MyFontSettings = new SvgFontSettings(); - [XmlIgnore] - public Font Font - { - get { return _MyFontSettings.Font; } - set { _MyFontSettings.Font = value; } - } - [System.ComponentModel.DefaultValueAttribute("")] - [XmlAttribute("font-family")] - public string FontFamily - { - get { return _MyFontSettings.FontFamily; } - set { _MyFontSettings.FontFamily = value; } - } - [System.ComponentModel.DefaultValueAttribute("")] - [XmlAttribute("font-size")] - public string FontSize - { - get { return _MyFontSettings.FontSize; } - set { _MyFontSettings.FontSize = value; } - } - [System.ComponentModel.DefaultValueAttribute("normal")] - [XmlAttribute("font-style")] - public string SVGFontStyle - { - get { return _MyFontSettings.SVGFontStyle; } - set { _MyFontSettings.SVGFontStyle = value; } - } - [System.ComponentModel.DefaultValueAttribute("normal")] - [XmlAttribute("font-weight")] - public string FontWeight - { - get { return _MyFontSettings.FontWeight; } - set { _MyFontSettings.FontWeight = value; } - } - [System.ComponentModel.DefaultValueAttribute("normal")] - [XmlAttribute("text-decoration")] - public string TextDecoration - { - get { return _MyFontSettings.TextDecoration; } - set { _MyFontSettings.TextDecoration = value; } - } - #endregion + //public partial class SvgRtf : SvgShapePart + //{ + // #region ctor + // public SvgRtf() { ;} + // public SvgRtf(PointF location, float width, string rtf, Font font, Color fillColor) + // { + // _X.Value = location.X; + // _Y.Value = location.Y; + // _Width.Value = width; + // Rtf = rtf; + // Font = font; + // FillColor = fillColor; + // LineColor = Color.Empty; + // LineWidth = new SvgMeasurement(0); + // } + // #endregion + // #region Location + // private SvgMeasurement _X = new SvgMeasurement(); + // [XmlIgnore] + // public SvgMeasurement X + // { + // get { return _X; } + // set { _X = value; } + // } + // [XmlAttribute("x")] + // [Browsable(false)] + // [EditorBrowsable(EditorBrowsableState.Never)] + // public string X_XmlSurrogate + // { + // get { return SvgXmlConverter.GetString(_X); } + // set { _X = SvgXmlConverter.GetObject(value); } + // } + // private SvgMeasurement _Y = new SvgMeasurement(); + // [XmlIgnore] + // public SvgMeasurement Y + // { + // get { return _Y; } + // set { _Y = value; } + // } + // [XmlAttribute("y")] + // [Browsable(false)] + // [EditorBrowsable(EditorBrowsableState.Never)] + // public string Y_XmlSurrogate + // { + // get { return SvgXmlConverter.GetString(_Y); } + // set { _Y = SvgXmlConverter.GetObject(value); } + // } + // #endregion + // #region Size + // private SvgMeasurement _Width = new SvgMeasurement(); + // [XmlIgnore] + // public SvgMeasurement Width + // { + // get { return _Width; } + // set { _Width = value; } + // } + // [XmlAttribute("width")] + // [Browsable(false)] + // [EditorBrowsable(EditorBrowsableState.Never)] + // public string Width_WidthmlSurrogate + // { + // get { return SvgXmlConverter.GetString(_Width); } + // set { _Width = SvgXmlConverter.GetObject(value); } + // } + // private SvgMeasurement _Height = new SvgMeasurement(); + // [XmlIgnore] + // public SvgMeasurement Height + // { + // get { return _Height; } + // set { _Height = value; } + // } + // [XmlAttribute("height")] + // [Browsable(false)] + // [EditorBrowsable(EditorBrowsableState.Never)] + // public string Height_XmlSurrogate + // { + // get { return SvgXmlConverter.GetString(_Height); } + // set { _Height = SvgXmlConverter.GetObject(value); } + // } + // #endregion + // #region Rtf + // private string _Rtf; + // [XmlText()] + // public string Rtf + // { + // get { return _Rtf; } + // set { _Rtf = value; } + // } + // #endregion + // #region Required Extensions + // private string _RequiredExtensions = "http://Volian.Com/EmbeddedRTF"; + // [Browsable(false)] + // [EditorBrowsable(EditorBrowsableState.Never)] + // [XmlAttribute("requiredExtensions")] + // public string RequiredExtensions + // { + // get { return _RequiredExtensions; } + // set { _RequiredExtensions = value; } + // } + // #endregion + // #region Font Settings + // private SvgFontSettings _MyFontSettings = new SvgFontSettings(); + // [XmlIgnore] + // public Font Font + // { + // get { return _MyFontSettings.Font; } + // set { _MyFontSettings.Font = value; } + // } + // [System.ComponentModel.DefaultValueAttribute("")] + // [XmlAttribute("font-family")] + // public string FontFamily + // { + // get { return _MyFontSettings.FontFamily; } + // set { _MyFontSettings.FontFamily = value; } + // } + // [System.ComponentModel.DefaultValueAttribute("")] + // [XmlAttribute("font-size")] + // public string FontSize + // { + // get { return _MyFontSettings.FontSize; } + // set { _MyFontSettings.FontSize = value; } + // } + // [System.ComponentModel.DefaultValueAttribute("normal")] + // [XmlAttribute("font-style")] + // public string SVGFontStyle + // { + // get { return _MyFontSettings.SVGFontStyle; } + // set { _MyFontSettings.SVGFontStyle = value; } + // } + // [System.ComponentModel.DefaultValueAttribute("normal")] + // [XmlAttribute("font-weight")] + // public string FontWeight + // { + // get { return _MyFontSettings.FontWeight; } + // set { _MyFontSettings.FontWeight = value; } + // } + // [System.ComponentModel.DefaultValueAttribute("normal")] + // [XmlAttribute("text-decoration")] + // public string TextDecoration + // { + // get { return _MyFontSettings.TextDecoration; } + // set { _MyFontSettings.TextDecoration = value; } + // } + // #endregion - #region Setup Inheritance - override internal void SetupInheritance(SvgInheritedSettings myParentsSettings) - { - base.SetupInheritance(myParentsSettings); - _MyFontSettings.MyParentsSettings = myParentsSettings.MyFontSettings; - } - #endregion - } + // #region Setup Inheritance + // override internal void SetupInheritance(SvgInheritedSettings myParentsSettings) + // { + // base.SetupInheritance(myParentsSettings); + // _MyFontSettings.MyParentsSettings = myParentsSettings.MyFontSettings; + // } + // #endregion + //} }