Allow for continuous change bars with message at top, when flag is changeid
This commit is contained in:
parent
3d2757f094
commit
b52a05af12
@ -709,7 +709,8 @@ namespace Volian.Print.Library
|
|||||||
|
|
||||||
// continuous case, if changes bars overlap, adjust size and don't add new one to
|
// continuous case, if changes bars overlap, adjust size and don't add new one to
|
||||||
// the MyChangeBars list.
|
// the MyChangeBars list.
|
||||||
if (MySection.ActiveFormat.PlantFormat.FormatData.ProcData.ChangeBarData.ContinuousChangeBars)
|
if (MySection.ActiveFormat.PlantFormat.FormatData.ProcData.ChangeBarData.ContinuousChangeBars ||
|
||||||
|
MySection.ActiveFormat.PlantFormat.FormatData.ProcData.ChangeBarData.ChangeIds)
|
||||||
{
|
{
|
||||||
if (OverlapOrSpan(cb, vcb))
|
if (OverlapOrSpan(cb, vcb))
|
||||||
{
|
{
|
||||||
|
@ -85,7 +85,8 @@ namespace Volian.Print.Library
|
|||||||
get {return YChangeBarBottom - YExtendLine; }
|
get {return YChangeBarBottom - YExtendLine; }
|
||||||
}
|
}
|
||||||
private bool _IsRev;
|
private bool _IsRev;
|
||||||
public vlnChangeBar(PdfContentByte cb, vlnParagraph parent, float xoff, float yoff, int msgAlignment, 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)
|
||||||
{
|
{
|
||||||
// for grids, a y adjustment is made to match 16bit output, see the variable 'GridTopAdjust'. Take this
|
// for grids, a y adjustment is made to match 16bit output, see the variable 'GridTopAdjust'. Take this
|
||||||
// adjustment into account for the change bar. 6.5 positioned the change bar to match 16bit output.
|
// adjustment into account for the change bar. 6.5 positioned the change bar to match 16bit output.
|
||||||
@ -95,6 +96,7 @@ namespace Volian.Print.Library
|
|||||||
YOffset = yoff;
|
YOffset = yoff;
|
||||||
MyParent = parent;
|
MyParent = parent;
|
||||||
_IsRev = isRev;
|
_IsRev = isRev;
|
||||||
|
_MsgAtTop = msgAtTop;
|
||||||
Messages = new SortedDictionary<float, vlnChangeBarMessage>();
|
Messages = new SortedDictionary<float, vlnChangeBarMessage>();
|
||||||
// if there is an RNO separator, add the separator's height in too.
|
// if there is an RNO separator, add the separator's height in too.
|
||||||
Height = parent.Height * MyPageHelper.YMultiplier + (parent.MyItemInfo.IsFigure?SixLinesPerInch:0);
|
Height = parent.Height * MyPageHelper.YMultiplier + (parent.MyItemInfo.IsFigure?SixLinesPerInch:0);
|
||||||
@ -185,7 +187,9 @@ namespace Volian.Print.Library
|
|||||||
float w = GetTableWidth(cb, myparagraph, MyParent.MyItemInfo.MyDocStyle.Layout.PageWidth);
|
float w = GetTableWidth(cb, myparagraph, MyParent.MyItemInfo.MyDocStyle.Layout.PageWidth);
|
||||||
float h = GetParagraphHeight(cb, myparagraph, w);
|
float h = GetParagraphHeight(cb, myparagraph, w);
|
||||||
cb.SetColorFill(changeBarColor);
|
cb.SetColorFill(changeBarColor);
|
||||||
Rtf2Pdf.TextAt(cb, myparagraph, XOffset + xAdj - Rtf2Pdf.Offset.X + 3, yBottom + h - Rtf2Pdf.Offset.Y + 2.7F, w, h, "", yBottomMargin);
|
float yloc = yBottom + h - Rtf2Pdf.Offset.Y + 2.7F;
|
||||||
|
if (_MsgAtTop) yloc = YOffset;
|
||||||
|
Rtf2Pdf.TextAt(cb, myparagraph, XOffset + xAdj - Rtf2Pdf.Offset.X + 3, yloc, w, h, "", yBottomMargin);
|
||||||
lastMsg = vcbm.Message;
|
lastMsg = vcbm.Message;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2961,7 +2961,9 @@ namespace Volian.Print.Library
|
|||||||
!itemInfo.IsInRNO)) msgAlign = Element.ALIGN_RIGHT;
|
!itemInfo.IsInRNO)) msgAlign = Element.ALIGN_RIGHT;
|
||||||
float coltotwips = col * itemInfo.FormatStepData.Font.CharsToTwips;
|
float coltotwips = col * itemInfo.FormatStepData.Font.CharsToTwips;
|
||||||
if (itemInfo.IsFigure) coltotwips = col * itemInfo.ActiveFormat.PlantFormat.FormatData.Font.CharsToTwips;
|
if (itemInfo.IsFigure) coltotwips = col * itemInfo.ActiveFormat.PlantFormat.FormatData.Font.CharsToTwips;
|
||||||
return new vlnChangeBar(cb, this, (float)itemInfo.MyDocStyle.Layout.LeftMargin + coltotwips, yoff, msgAlign, myPageHelper.ChangeBarDefinition.MyChangeBarText == PrintChangeBarText.RevNum);
|
return new vlnChangeBar(cb, this, (float)itemInfo.MyDocStyle.Layout.LeftMargin + coltotwips, yoff, msgAlign,
|
||||||
|
myPageHelper.ChangeBarDefinition.MyChangeBarText == PrintChangeBarText.RevNum,
|
||||||
|
itemInfo.ActiveFormat.PlantFormat.FormatData.ProcData.ChangeBarData.ChangeIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
private int ChangeBarLocation(float c, vlnParagraph paragraph, FormatInfo formatInfo, int maxRNO)
|
private int ChangeBarLocation(float c, vlnParagraph paragraph, FormatInfo formatInfo, int maxRNO)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user