missing box
docstyle messages: {par} consistent with code docstyle messages: {par} consistent with code & missing box Handle par in endmessage Allow for more end message text length Handle asterisk hls draws when steps are compressed For RNO separator, if aer column is further down on page than rno, print rno separator off of aer (was causing separator to print beyond margin)
This commit is contained in:
@@ -415,9 +415,12 @@ namespace Volian.Print.Library
|
||||
// this box is not drawn, it is a series of asterisks drawn above and below text.
|
||||
top = CalculateYOffset(yPageStart, yTopMargin);
|
||||
if (MyPageHelper.YMultiplier != 1) top += 2;
|
||||
bottom = (yPageStart - (MyParent.YBottomForBox > 0 ? MyParent.YBottomForBox : MyParent.YBottomMost)) * MyPageHelper.YMultiplier;
|
||||
//_MyLog.WarnFormat("\"ATB\"\t\"{0}\"\t{1}\t{2}\t{3}\t{4}\t{5}\t{6}\t{7}", MyParent, yPageStart, top, bottom, MyPageHelper.YMultiplier, MyPageHelper.CurrentPageNumber, MyParent.YBottomMost, MyParent.YBottomForBox);
|
||||
|
||||
float ytmpbottom1 = yPageStart - (MyParent.YBottomForBox > 0 ? MyParent.YBottomForBox : MyParent.YBottomMost);
|
||||
if (MyPageHelper.YMultiplier != 1)
|
||||
{
|
||||
ytmpbottom1 = (-1 + yTopMargin - (yTopMargin - ytmpbottom1) * MyPageHelper.YMultiplier) + 2;
|
||||
}
|
||||
bottom = ytmpbottom1;
|
||||
// create a new font without any styles such as underline.
|
||||
E_Style es = ((vef.Style & E_Style.Bold) == E_Style.Bold) ? E_Style.Bold : E_Style.None;
|
||||
// if the box has a font, use it - otherwise use this item info's font
|
||||
@@ -485,30 +488,44 @@ namespace Volian.Print.Library
|
||||
{
|
||||
// set the top & bottom of sides. If there is a page break in the middle of box, adjust these.
|
||||
// The vlnBox property, ContainsPageBreak, flags that a break occurred.
|
||||
float yOffBreak = 0;
|
||||
if (!ContainsPageBreak)
|
||||
{
|
||||
top = CalculateYOffset(yPageStart, yTopMargin);
|
||||
if (MyPageHelper.YMultiplier != 1) top += 2;
|
||||
// if this broke, the bottom is defined where the parabreak occurred.
|
||||
float yOffBreak = MyPageHelper.ParaBreaks.Count > 0 ? MyPageHelper.ParaBreaks[0].YOffset : 0;
|
||||
yOffBreak = MyPageHelper.ParaBreaks.Count > 0 ? MyPageHelper.ParaBreaks[0].YOffset : 0;
|
||||
if (yOffBreak > 0)
|
||||
bottom = (yPageStart - yOffBreak) * MyPageHelper.YMultiplier;
|
||||
else
|
||||
bottom = (yPageStart - (MyParent.YBottomForBox > 0 ? MyParent.YBottomForBox : MyParent.YBottomMost)) * MyPageHelper.YMultiplier;
|
||||
{
|
||||
float ytmpbottom = yPageStart - (MyParent.YBottomForBox > 0 ? MyParent.YBottomForBox : MyParent.YBottomMost);
|
||||
if (MyPageHelper.YMultiplier != 1)
|
||||
{
|
||||
ytmpbottom = -1 + yTopMargin - (yTopMargin - ytmpbottom) * MyPageHelper.YMultiplier;
|
||||
}
|
||||
bottom = ytmpbottom;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
top = CalculateYOffset(yPageStart, yTopMargin);
|
||||
float yOffBreak = MyPageHelper.ParaBreaks.Count > 0 ? MyPageHelper.ParaBreaks[0].YOffset : 0;
|
||||
yOffBreak = MyPageHelper.ParaBreaks.Count > 0 ? MyPageHelper.ParaBreaks[0].YOffset : 0;
|
||||
if (yOffBreak > 0)
|
||||
bottom = (yPageStart - yOffBreak) * MyPageHelper.YMultiplier;
|
||||
else
|
||||
bottom = (yPageStart - (MyParent.YBottomForBox > 0 ? MyParent.YBottomForBox : MyParent.YBottomMost)) * MyPageHelper.YMultiplier;
|
||||
{
|
||||
float ytmpbottom1 = yPageStart - (MyParent.YBottomForBox > 0 ? MyParent.YBottomForBox : MyParent.YBottomMost);
|
||||
if (MyPageHelper.YMultiplier != 1)
|
||||
{
|
||||
ytmpbottom1 = -1 + yTopMargin - (yTopMargin - ytmpbottom1) * MyPageHelper.YMultiplier;
|
||||
}
|
||||
bottom = ytmpbottom1;
|
||||
}
|
||||
top = yTopMargin; // reset top to top margin since there was a page break.
|
||||
}
|
||||
// Check that the bottom is within the bottom margin, if this step spans more than one page,
|
||||
// stop the side asterisks at the bottom margin. (pagination puts inserts a page break here)
|
||||
//_MyLog.WarnFormat("\"AS\"\t\"{0}\"\t{1}\t{2}\t{3}\t{4}\t{5}\t{6}\t{7}", MyParent, yPageStart, top, bottom, MyPageHelper.YMultiplier, MyPageHelper.CurrentPageNumber, MyParent.YBottomMost, MyParent.YBottomForBox);
|
||||
if (bottom < yBottomMargin) bottom = yBottomMargin;
|
||||
|
||||
float height = (SixLinesPerInch * MyPageHelper.YMultiplier) + 4; // just add a little on so that height is a little bigger than character
|
||||
|
Reference in New Issue
Block a user