Removed SvgRtf
This commit is contained in:
parent
4e85f82557
commit
21f32e3434
@ -130,23 +130,23 @@ namespace Volian.Svg.Library
|
|||||||
graphics.DrawRectangle(pen, scale.X(X),scale.Y(Y), scale.M(Width), scale.M(Height));
|
graphics.DrawRectangle(pen, scale.X(X),scale.Y(Y), scale.M(Width), scale.M(Height));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public partial class SvgRtf : SvgShapePart
|
//public partial class SvgRtf : SvgShapePart
|
||||||
{
|
//{
|
||||||
//private static float _Factor = 1.085F; // 20 point Arial Font
|
// //private static float _Factor = 1.085F; // 20 point Arial Font
|
||||||
public override void Draw(System.Drawing.Graphics graphics, SvgScale scale, Svg mySvg, SvgPartInheritance myParent)
|
// public override void Draw(System.Drawing.Graphics graphics, SvgScale scale, Svg mySvg, SvgPartInheritance myParent)
|
||||||
{
|
// {
|
||||||
SetupInheritance(myParent.MyInheritedSettings);
|
// SetupInheritance(myParent.MyInheritedSettings);
|
||||||
_MyFontSettings.Scale = scale.M(1F);
|
// _MyFontSettings.Scale = scale.M(1F);
|
||||||
}
|
// }
|
||||||
private float YAdjustment(Graphics gr, Font fnt)
|
// private float YAdjustment(Graphics gr, Font fnt)
|
||||||
{
|
// {
|
||||||
int yAsc = fnt.FontFamily.GetCellAscent(fnt.Style);
|
// int yAsc = fnt.FontFamily.GetCellAscent(fnt.Style);
|
||||||
int yLS = fnt.FontFamily.GetLineSpacing(fnt.Style);
|
// int yLS = fnt.FontFamily.GetLineSpacing(fnt.Style);
|
||||||
float gth = fnt.GetHeight(gr);
|
// float gth = fnt.GetHeight(gr);
|
||||||
float fAsc = (yAsc * gth) / yLS;
|
// float fAsc = (yAsc * gth) / yLS;
|
||||||
return -fAsc;
|
// return -fAsc;
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
public partial class SvgText : SvgShapePart
|
public partial class SvgText : SvgShapePart
|
||||||
{
|
{
|
||||||
//private static float _Factor = 1.085F; // 20 point Arial Font
|
//private static float _Factor = 1.085F; // 20 point Arial Font
|
||||||
|
@ -32,7 +32,7 @@ namespace Volian.Svg.Library
|
|||||||
#region Parts
|
#region Parts
|
||||||
// SVG Parts
|
// SVG Parts
|
||||||
SvgParts _SvgParts = new SvgParts();
|
SvgParts _SvgParts = new SvgParts();
|
||||||
[XmlElement("foreignObject", typeof(SvgRtf))]
|
//[XmlElement("foreignObject", typeof(SvgRtf))]
|
||||||
[XmlElement("use", typeof(SvgUse))]
|
[XmlElement("use", typeof(SvgUse))]
|
||||||
[XmlElement("image", typeof(SvgImage))]
|
[XmlElement("image", typeof(SvgImage))]
|
||||||
[XmlElement("text", typeof(SvgText))]
|
[XmlElement("text", typeof(SvgText))]
|
||||||
|
@ -8,157 +8,157 @@ using System.ComponentModel;
|
|||||||
|
|
||||||
namespace Volian.Svg.Library
|
namespace Volian.Svg.Library
|
||||||
{
|
{
|
||||||
public partial class SvgRtf : SvgShapePart
|
//public partial class SvgRtf : SvgShapePart
|
||||||
{
|
//{
|
||||||
#region ctor
|
// #region ctor
|
||||||
public SvgRtf() { ;}
|
// public SvgRtf() { ;}
|
||||||
public SvgRtf(PointF location, float width, string rtf, Font font, Color fillColor)
|
// public SvgRtf(PointF location, float width, string rtf, Font font, Color fillColor)
|
||||||
{
|
// {
|
||||||
_X.Value = location.X;
|
// _X.Value = location.X;
|
||||||
_Y.Value = location.Y;
|
// _Y.Value = location.Y;
|
||||||
_Width.Value = width;
|
// _Width.Value = width;
|
||||||
Rtf = rtf;
|
// Rtf = rtf;
|
||||||
Font = font;
|
// Font = font;
|
||||||
FillColor = fillColor;
|
// FillColor = fillColor;
|
||||||
LineColor = Color.Empty;
|
// LineColor = Color.Empty;
|
||||||
LineWidth = new SvgMeasurement(0);
|
// LineWidth = new SvgMeasurement(0);
|
||||||
}
|
// }
|
||||||
#endregion
|
// #endregion
|
||||||
#region Location
|
// #region Location
|
||||||
private SvgMeasurement _X = new SvgMeasurement();
|
// private SvgMeasurement _X = new SvgMeasurement();
|
||||||
[XmlIgnore]
|
// [XmlIgnore]
|
||||||
public SvgMeasurement X
|
// public SvgMeasurement X
|
||||||
{
|
// {
|
||||||
get { return _X; }
|
// get { return _X; }
|
||||||
set { _X = value; }
|
// set { _X = value; }
|
||||||
}
|
// }
|
||||||
[XmlAttribute("x")]
|
// [XmlAttribute("x")]
|
||||||
[Browsable(false)]
|
// [Browsable(false)]
|
||||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
// [EditorBrowsable(EditorBrowsableState.Never)]
|
||||||
public string X_XmlSurrogate
|
// public string X_XmlSurrogate
|
||||||
{
|
// {
|
||||||
get { return SvgXmlConverter<SvgMeasurement>.GetString(_X); }
|
// get { return SvgXmlConverter<SvgMeasurement>.GetString(_X); }
|
||||||
set { _X = SvgXmlConverter<SvgMeasurement>.GetObject(value); }
|
// set { _X = SvgXmlConverter<SvgMeasurement>.GetObject(value); }
|
||||||
}
|
// }
|
||||||
private SvgMeasurement _Y = new SvgMeasurement();
|
// private SvgMeasurement _Y = new SvgMeasurement();
|
||||||
[XmlIgnore]
|
// [XmlIgnore]
|
||||||
public SvgMeasurement Y
|
// public SvgMeasurement Y
|
||||||
{
|
// {
|
||||||
get { return _Y; }
|
// get { return _Y; }
|
||||||
set { _Y = value; }
|
// set { _Y = value; }
|
||||||
}
|
// }
|
||||||
[XmlAttribute("y")]
|
// [XmlAttribute("y")]
|
||||||
[Browsable(false)]
|
// [Browsable(false)]
|
||||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
// [EditorBrowsable(EditorBrowsableState.Never)]
|
||||||
public string Y_XmlSurrogate
|
// public string Y_XmlSurrogate
|
||||||
{
|
// {
|
||||||
get { return SvgXmlConverter<SvgMeasurement>.GetString(_Y); }
|
// get { return SvgXmlConverter<SvgMeasurement>.GetString(_Y); }
|
||||||
set { _Y = SvgXmlConverter<SvgMeasurement>.GetObject(value); }
|
// set { _Y = SvgXmlConverter<SvgMeasurement>.GetObject(value); }
|
||||||
}
|
// }
|
||||||
#endregion
|
// #endregion
|
||||||
#region Size
|
// #region Size
|
||||||
private SvgMeasurement _Width = new SvgMeasurement();
|
// private SvgMeasurement _Width = new SvgMeasurement();
|
||||||
[XmlIgnore]
|
// [XmlIgnore]
|
||||||
public SvgMeasurement Width
|
// public SvgMeasurement Width
|
||||||
{
|
// {
|
||||||
get { return _Width; }
|
// get { return _Width; }
|
||||||
set { _Width = value; }
|
// set { _Width = value; }
|
||||||
}
|
// }
|
||||||
[XmlAttribute("width")]
|
// [XmlAttribute("width")]
|
||||||
[Browsable(false)]
|
// [Browsable(false)]
|
||||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
// [EditorBrowsable(EditorBrowsableState.Never)]
|
||||||
public string Width_WidthmlSurrogate
|
// public string Width_WidthmlSurrogate
|
||||||
{
|
// {
|
||||||
get { return SvgXmlConverter<SvgMeasurement>.GetString(_Width); }
|
// get { return SvgXmlConverter<SvgMeasurement>.GetString(_Width); }
|
||||||
set { _Width = SvgXmlConverter<SvgMeasurement>.GetObject(value); }
|
// set { _Width = SvgXmlConverter<SvgMeasurement>.GetObject(value); }
|
||||||
}
|
// }
|
||||||
private SvgMeasurement _Height = new SvgMeasurement();
|
// private SvgMeasurement _Height = new SvgMeasurement();
|
||||||
[XmlIgnore]
|
// [XmlIgnore]
|
||||||
public SvgMeasurement Height
|
// public SvgMeasurement Height
|
||||||
{
|
// {
|
||||||
get { return _Height; }
|
// get { return _Height; }
|
||||||
set { _Height = value; }
|
// set { _Height = value; }
|
||||||
}
|
// }
|
||||||
[XmlAttribute("height")]
|
// [XmlAttribute("height")]
|
||||||
[Browsable(false)]
|
// [Browsable(false)]
|
||||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
// [EditorBrowsable(EditorBrowsableState.Never)]
|
||||||
public string Height_XmlSurrogate
|
// public string Height_XmlSurrogate
|
||||||
{
|
// {
|
||||||
get { return SvgXmlConverter<SvgMeasurement>.GetString(_Height); }
|
// get { return SvgXmlConverter<SvgMeasurement>.GetString(_Height); }
|
||||||
set { _Height = SvgXmlConverter<SvgMeasurement>.GetObject(value); }
|
// set { _Height = SvgXmlConverter<SvgMeasurement>.GetObject(value); }
|
||||||
}
|
// }
|
||||||
#endregion
|
// #endregion
|
||||||
#region Rtf
|
// #region Rtf
|
||||||
private string _Rtf;
|
// private string _Rtf;
|
||||||
[XmlText()]
|
// [XmlText()]
|
||||||
public string Rtf
|
// public string Rtf
|
||||||
{
|
// {
|
||||||
get { return _Rtf; }
|
// get { return _Rtf; }
|
||||||
set { _Rtf = value; }
|
// set { _Rtf = value; }
|
||||||
}
|
// }
|
||||||
#endregion
|
// #endregion
|
||||||
#region Required Extensions
|
// #region Required Extensions
|
||||||
private string _RequiredExtensions = "http://Volian.Com/EmbeddedRTF";
|
// private string _RequiredExtensions = "http://Volian.Com/EmbeddedRTF";
|
||||||
[Browsable(false)]
|
// [Browsable(false)]
|
||||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
// [EditorBrowsable(EditorBrowsableState.Never)]
|
||||||
[XmlAttribute("requiredExtensions")]
|
// [XmlAttribute("requiredExtensions")]
|
||||||
public string RequiredExtensions
|
// public string RequiredExtensions
|
||||||
{
|
// {
|
||||||
get { return _RequiredExtensions; }
|
// get { return _RequiredExtensions; }
|
||||||
set { _RequiredExtensions = value; }
|
// set { _RequiredExtensions = value; }
|
||||||
}
|
// }
|
||||||
#endregion
|
// #endregion
|
||||||
#region Font Settings
|
// #region Font Settings
|
||||||
private SvgFontSettings _MyFontSettings = new SvgFontSettings();
|
// private SvgFontSettings _MyFontSettings = new SvgFontSettings();
|
||||||
[XmlIgnore]
|
// [XmlIgnore]
|
||||||
public Font Font
|
// public Font Font
|
||||||
{
|
// {
|
||||||
get { return _MyFontSettings.Font; }
|
// get { return _MyFontSettings.Font; }
|
||||||
set { _MyFontSettings.Font = value; }
|
// set { _MyFontSettings.Font = value; }
|
||||||
}
|
// }
|
||||||
[System.ComponentModel.DefaultValueAttribute("")]
|
// [System.ComponentModel.DefaultValueAttribute("")]
|
||||||
[XmlAttribute("font-family")]
|
// [XmlAttribute("font-family")]
|
||||||
public string FontFamily
|
// public string FontFamily
|
||||||
{
|
// {
|
||||||
get { return _MyFontSettings.FontFamily; }
|
// get { return _MyFontSettings.FontFamily; }
|
||||||
set { _MyFontSettings.FontFamily = value; }
|
// set { _MyFontSettings.FontFamily = value; }
|
||||||
}
|
// }
|
||||||
[System.ComponentModel.DefaultValueAttribute("")]
|
// [System.ComponentModel.DefaultValueAttribute("")]
|
||||||
[XmlAttribute("font-size")]
|
// [XmlAttribute("font-size")]
|
||||||
public string FontSize
|
// public string FontSize
|
||||||
{
|
// {
|
||||||
get { return _MyFontSettings.FontSize; }
|
// get { return _MyFontSettings.FontSize; }
|
||||||
set { _MyFontSettings.FontSize = value; }
|
// set { _MyFontSettings.FontSize = value; }
|
||||||
}
|
// }
|
||||||
[System.ComponentModel.DefaultValueAttribute("normal")]
|
// [System.ComponentModel.DefaultValueAttribute("normal")]
|
||||||
[XmlAttribute("font-style")]
|
// [XmlAttribute("font-style")]
|
||||||
public string SVGFontStyle
|
// public string SVGFontStyle
|
||||||
{
|
// {
|
||||||
get { return _MyFontSettings.SVGFontStyle; }
|
// get { return _MyFontSettings.SVGFontStyle; }
|
||||||
set { _MyFontSettings.SVGFontStyle = value; }
|
// set { _MyFontSettings.SVGFontStyle = value; }
|
||||||
}
|
// }
|
||||||
[System.ComponentModel.DefaultValueAttribute("normal")]
|
// [System.ComponentModel.DefaultValueAttribute("normal")]
|
||||||
[XmlAttribute("font-weight")]
|
// [XmlAttribute("font-weight")]
|
||||||
public string FontWeight
|
// public string FontWeight
|
||||||
{
|
// {
|
||||||
get { return _MyFontSettings.FontWeight; }
|
// get { return _MyFontSettings.FontWeight; }
|
||||||
set { _MyFontSettings.FontWeight = value; }
|
// set { _MyFontSettings.FontWeight = value; }
|
||||||
}
|
// }
|
||||||
[System.ComponentModel.DefaultValueAttribute("normal")]
|
// [System.ComponentModel.DefaultValueAttribute("normal")]
|
||||||
[XmlAttribute("text-decoration")]
|
// [XmlAttribute("text-decoration")]
|
||||||
public string TextDecoration
|
// public string TextDecoration
|
||||||
{
|
// {
|
||||||
get { return _MyFontSettings.TextDecoration; }
|
// get { return _MyFontSettings.TextDecoration; }
|
||||||
set { _MyFontSettings.TextDecoration = value; }
|
// set { _MyFontSettings.TextDecoration = value; }
|
||||||
}
|
// }
|
||||||
#endregion
|
// #endregion
|
||||||
|
|
||||||
#region Setup Inheritance
|
// #region Setup Inheritance
|
||||||
override internal void SetupInheritance(SvgInheritedSettings myParentsSettings)
|
// override internal void SetupInheritance(SvgInheritedSettings myParentsSettings)
|
||||||
{
|
// {
|
||||||
base.SetupInheritance(myParentsSettings);
|
// base.SetupInheritance(myParentsSettings);
|
||||||
_MyFontSettings.MyParentsSettings = myParentsSettings.MyFontSettings;
|
// _MyFontSettings.MyParentsSettings = myParentsSettings.MyFontSettings;
|
||||||
}
|
// }
|
||||||
#endregion
|
// #endregion
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user