AER table location improvements
This commit is contained in:
parent
b2e7b92243
commit
2b49417673
@ -1878,8 +1878,10 @@ namespace Volian.Print.Library
|
||||
// if in rno column, the upper limit is width of the page (right margin). Subtract off size of a character
|
||||
xUpperLimit = pageWidth - (72 / (float)MyItemInfo.FormatStepData.Font.CPI);
|
||||
else
|
||||
// in the following calculation, the hls width (hls1.Width) == rno column width, so xUpperLimit is
|
||||
// the around the right margin, i.e. 'hls xoffset' + 'location of rno (colR) * columnmode' + 'width of rno'
|
||||
xUpperLimit = hls1.XOffset + hls1.Width + colR * itemInfo.ColumnMode;
|
||||
|
||||
|
||||
float TableCenterPos = float.Parse(formatInfo.MyStepSectionLayoutData.TableCenterPos.Split(",".ToCharArray())[itemInfo.ColumnMode]);
|
||||
if (formatInfo.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.TieTabToLevel)
|
||||
XOffset = leftMargin + (pageWidth - leftMargin - Width) / 2;
|
||||
@ -1915,8 +1917,15 @@ namespace Volian.Print.Library
|
||||
}
|
||||
// 05/14/12 - The PosAdjust is a format flag from 16bit. For WCN2, it appears that this amount equals
|
||||
// the amount of difference from a 10 CPI to a 12 CPI font. See comment above.
|
||||
if (itemInfo.FormatStepData != null && itemInfo.FormatStepData.StepPrintData != null)
|
||||
XOffset += (float)(itemInfo.FormatStepData.StepPrintData.PosAdjust ?? 0);
|
||||
float posAdjust = (float)(itemInfo.FormatStepData.StepPrintData.PosAdjust ?? 0);
|
||||
if (itemInfo.FormatStepData != null && itemInfo.FormatStepData.StepPrintData != null &&
|
||||
posAdjust > 0)
|
||||
{
|
||||
if (Width < hls1.Width - posAdjust)
|
||||
XOffset += posAdjust;
|
||||
else if (Width < hls1.Width)
|
||||
XOffset = hls1.XOffset + hls1.Width - Width; // align with the right edge of hls text
|
||||
}
|
||||
}
|
||||
|
||||
// if the XOffset < High Level Step Text's XOffset, then align with the High Level Step Text
|
||||
|
Loading…
x
Reference in New Issue
Block a user