diff --git a/PROMS/Volian.Svg.Library/Svg.cs b/PROMS/Volian.Svg.Library/Svg.cs index c32d5819..982a7029 100644 --- a/PROMS/Volian.Svg.Library/Svg.cs +++ b/PROMS/Volian.Svg.Library/Svg.cs @@ -9,6 +9,12 @@ namespace Volian.Svg.Library [XmlRoot("svg")] public partial class Svg : SvgGroup { + private static System.Drawing.PointF _AbsoluteOffset; + public static System.Drawing.PointF AbsoluteOffset + { + get { return Svg._AbsoluteOffset; } + set { Svg._AbsoluteOffset = value; } + } private static System.Drawing.Color _OverrrideColor = System.Drawing.Color.Empty; public static System.Drawing.Color OverrideColor { diff --git a/PROMS/Volian.Svg.Library/SvgLine.cs b/PROMS/Volian.Svg.Library/SvgLine.cs index 28e135e8..c613d60a 100644 --- a/PROMS/Volian.Svg.Library/SvgLine.cs +++ b/PROMS/Volian.Svg.Library/SvgLine.cs @@ -86,6 +86,16 @@ namespace Volian.Svg.Library set { _Y2 = SvgXmlConverter.GetObject(value); } } #endregion + #region Description + private string _Description = string.Empty; + [System.ComponentModel.DefaultValueAttribute("")] + [XmlElement("desc")] + public string Description + { + get { return _Description; } + set { _Description = value; } + } + #endregion #region LineColor //protected Color _LineColor = Color.Empty; //[XmlIgnoreAttribute()] diff --git a/PROMS/Volian.Svg.Library/SvgRectangle.cs b/PROMS/Volian.Svg.Library/SvgRectangle.cs index d406f224..2e34ed35 100644 --- a/PROMS/Volian.Svg.Library/SvgRectangle.cs +++ b/PROMS/Volian.Svg.Library/SvgRectangle.cs @@ -23,6 +23,16 @@ namespace Volian.Svg.Library } //XMLElementAttribute(ElementName = "PREFIX", IsNullable = false) #endregion + #region Description + private string _Description = string.Empty; + [System.ComponentModel.DefaultValueAttribute("")] + [XmlElement("desc")] + public string Description + { + get { return _Description; } + set { _Description = value; } + } + #endregion #region Location private SvgMeasurement _X = new SvgMeasurement(); [XmlIgnore] diff --git a/PROMS/Volian.Svg.Library/SvgScale.cs b/PROMS/Volian.Svg.Library/SvgScale.cs index 6a8b551b..94c523b0 100644 --- a/PROMS/Volian.Svg.Library/SvgScale.cs +++ b/PROMS/Volian.Svg.Library/SvgScale.cs @@ -79,6 +79,18 @@ namespace Volian.Svg.Library { return _Scale * (y - YLowerLimit); } + public float AbsX(SvgMeasurement x) + { + return x.GetSizeInPixels(DPI) + Svg.AbsoluteOffset.X; + } + public float AbsY(iTextSharp.text.pdf.PdfContentByte cb, SvgMeasurement y) + { + // the following line of code is 'taken' from the 16bit code: \promsnt\exe\wined\togdi.cpp + // whenever doing an 'Absolute' macro. + float yOffset = 54 * 4.8f + 0.5f; // yOffset starts in 'twips' (twip = 1/20 point) + yOffset = yOffset / 20; // convert from twips to points (point = 1/72 inch) + return cb.PdfDocument.PageSize.Height - y.GetSizeInPixels(DPI) + yOffset + Svg.AbsoluteOffset.Y; + } public float Y(iTextSharp.text.pdf.PdfContentByte cb, float y) { return cb.PdfDocument.PageSize.Height - _Scale * (y - YLowerLimit); diff --git a/PROMS/Volian.Svg.Library/SvgText.cs b/PROMS/Volian.Svg.Library/SvgText.cs index 5844a4cf..41988c87 100644 --- a/PROMS/Volian.Svg.Library/SvgText.cs +++ b/PROMS/Volian.Svg.Library/SvgText.cs @@ -125,6 +125,16 @@ namespace Volian.Svg.Library set { _MyFontSettings.TextDecoration = value; } } #endregion + #region Description + private string _Description = string.Empty; + [System.ComponentModel.DefaultValueAttribute("")] + [XmlElement("desc")] + public string Description + { + get { return _Description; } + set { _Description = value; } + } + #endregion #region Setup Inheritance override internal void SetupInheritance(SvgInheritedSettings myParentsSettings) {