From 01f078ea4fbb14ead0774358c877866b99bf356d Mon Sep 17 00:00:00 2001 From: Kathy Date: Wed, 27 Aug 2014 16:48:35 +0000 Subject: [PATCH] =?UTF-8?q?Added=20property=20=E2=80=98BottomIsTable?= =?UTF-8?q?=E2=80=99=20for=20determining=20that=20last=20item=20with=20cha?= =?UTF-8?q?nge=20bar=20is=20a=20table=20For=20Calvert=20Alarms,=20include?= =?UTF-8?q?=20table=20in=20continuous=20change=20bars?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Volian.Print.Library/VlnSvgPageHelper.cs | 19 ++++++++++++------- PROMS/Volian.Print.Library/vlnChangeBar.cs | 6 ++++++ 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs b/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs index 67cd155f..a0572fd2 100644 --- a/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs +++ b/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs @@ -722,6 +722,7 @@ namespace Volian.Print.Library { if (prevCB == null) prevCB = cb; else if (prevCB.YChangeBarBottom > cb.YChangeBarBottom) prevCB = cb; + cb.BottomIsTable = (vcb.MyParent.MyItemInfo.IsTable); } } } @@ -779,19 +780,23 @@ namespace Volian.Print.Library } private bool OverlapOrSpan(vlnChangeBar cb, vlnChangeBar vcb) { + float tolerance = vlnPrintObject.SixLinesPerInch; + if (cb.MyParent.MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvertAlarm && + (vcb.MyParent.MyItemInfo.IsTable || cb.MyParent.MyItemInfo.IsTable || cb.BottomIsTable)) tolerance *= 1.5f; + if (cb.MyParent.MyItemInfo.MyHLS.ItemID != vcb.MyParent.MyItemInfo.MyHLS.ItemID) return false; // cb.Yoffset is within range of vcb: - if (cb.YOffset <= vcb.YOffset && - cb.YOffset >= (vcb.YChangeBarBottomExtend - vlnPrintObject.SixLinesPerInch)) return true; + if (cb.YOffset <= vcb.YOffset && + cb.YOffset >= (vcb.YChangeBarBottomExtend - tolerance)) return true; // cb.YChangeBarBottom is within range of vcb: - if ((cb.YChangeBarBottomExtend-vlnPrintObject.SixLinesPerInch) <= vcb.YOffset && - cb.YChangeBarBottomExtend >= (vcb.YChangeBarBottomExtend - vlnPrintObject.SixLinesPerInch)) return true; + if ((cb.YChangeBarBottomExtend - tolerance) <= vcb.YOffset && + cb.YChangeBarBottomExtend >= (vcb.YChangeBarBottomExtend - tolerance)) return true; // vcb.Yoffset is within range of cb: if (vcb.YOffset <= cb.YOffset && - vcb.YOffset >= (cb.YChangeBarBottomExtend - vlnPrintObject.SixLinesPerInch)) return true; + vcb.YOffset >= (cb.YChangeBarBottomExtend - tolerance)) return true; // vcb.YChangeBarBottom is within range of cb: - if ((vcb.YChangeBarBottomExtend - vlnPrintObject.SixLinesPerInch) <= cb.YOffset && - vcb.YChangeBarBottomExtend >= (cb.YChangeBarBottomExtend - vlnPrintObject.SixLinesPerInch)) return true; + if ((vcb.YChangeBarBottomExtend - tolerance) <= cb.YOffset && + vcb.YChangeBarBottomExtend >= (cb.YChangeBarBottomExtend - tolerance)) return true; return false; } private PromsPrinter _MyPromsPrinter; diff --git a/PROMS/Volian.Print.Library/vlnChangeBar.cs b/PROMS/Volian.Print.Library/vlnChangeBar.cs index 79a94f17..1b51152b 100644 --- a/PROMS/Volian.Print.Library/vlnChangeBar.cs +++ b/PROMS/Volian.Print.Library/vlnChangeBar.cs @@ -84,6 +84,12 @@ namespace Volian.Print.Library { get {return YChangeBarBottom - YExtendLine; } } + private bool _BottomIsTable = false; + public bool BottomIsTable + { + get { return _BottomIsTable; } + set { _BottomIsTable = value; } + } private bool _IsRev; private bool _MsgAtTop; // flags that message should be drawn at top of change bar public vlnChangeBar(PdfContentByte cb, vlnParagraph parent, float xoff, float yoff, int msgAlignment, bool isRev, bool msgAtTop)