Fix B2016-219: VC Summer’s centerline prints on top of figure
This commit is contained in:
parent
5bd0d550ac
commit
ba5736d19a
@ -527,7 +527,7 @@ namespace Volian.Print.Library
|
|||||||
{
|
{
|
||||||
yLocation -= (SixLinesPerInch * MyPageHelper.YMultiplier);
|
yLocation -= (SixLinesPerInch * MyPageHelper.YMultiplier);
|
||||||
if (ImageText != null)
|
if (ImageText != null)
|
||||||
retval = DrawFigure(cb, yBottomMargin, yLocation);
|
retval = DrawFigure(cb, yBottomMargin, yLocation, yPageStart, yTopMargin);
|
||||||
else
|
else
|
||||||
retval = DrawText(cb, ref yPageStart, yTopMargin, yBottomMargin, ref yLocation);
|
retval = DrawText(cb, ref yPageStart, yTopMargin, yBottomMargin, ref yLocation);
|
||||||
|
|
||||||
@ -1204,7 +1204,7 @@ namespace Volian.Print.Library
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//private bool _TextDebug = false; //true; this will turn on a writeline with debug in DrawText()
|
//private bool _TextDebug = false; //true; this will turn on a writeline with debug in DrawText()
|
||||||
private float DrawFigure(PdfContentByte cb, float yBottomMargin, float yLocation)
|
private float DrawFigure(PdfContentByte cb, float yBottomMargin, float yLocation, float yPageStart, float yTopMargin)
|
||||||
{
|
{
|
||||||
int profileDepth = ProfileTimer.Push("vlnParagraph.DrawFigure");
|
int profileDepth = ProfileTimer.Push("vlnParagraph.DrawFigure");
|
||||||
float retval = yLocation;
|
float retval = yLocation;
|
||||||
@ -1251,6 +1251,19 @@ namespace Volian.Print.Library
|
|||||||
}
|
}
|
||||||
//iTextSharp.text.Image it_image = iTextSharp.text.Image.GetInstance(ROImageInfo.Decompress(roImage.Content, size));
|
//iTextSharp.text.Image it_image = iTextSharp.text.Image.GetInstance(ROImageInfo.Decompress(roImage.Content, size));
|
||||||
retval = Rtf2Pdf.FigureAt(cb, it_image, XOffset + MyItemInfo.FormatStepData.Font.CharsToTwips, yLocation, Width * MyPageHelper.YMultiplier, Height * MyPageHelper.YMultiplier, DebugInfo, yBottomMargin, !MyItemInfo.FormatStepData.Type.Contains("Borderless"));
|
retval = Rtf2Pdf.FigureAt(cb, it_image, XOffset + MyItemInfo.FormatStepData.Font.CharsToTwips, yLocation, Width * MyPageHelper.YMultiplier, Height * MyPageHelper.YMultiplier, DebugInfo, yBottomMargin, !MyItemInfo.FormatStepData.Type.Contains("Borderless"));
|
||||||
|
|
||||||
|
// The following code was added to fix B2016-219 (for VCS, the centerline drew through a figure). The 'top' value was taken from the code
|
||||||
|
// that draws the vlnBoxes (Caution/Note, etc)
|
||||||
|
// The adjustments, adjtop & adjbottom, were necessary to get the vertical centerline to meet up correctly with the top/bottom of the figure. These
|
||||||
|
// numbers were determined by trial and error.
|
||||||
|
float top = CalculateYOffset(yPageStart, yTopMargin) - (7 * MyPageHelper.YMultiplier);
|
||||||
|
float adjtop=0;
|
||||||
|
float adjbottom=0;
|
||||||
|
if (MyPageHelper.YMultiplier == 1)
|
||||||
|
adjtop = -3;
|
||||||
|
else
|
||||||
|
adjbottom = -1;
|
||||||
|
MyPageHelper.MyGaps.Add(new Gap(top + adjtop, top - Height - Rtf2Pdf.Offset.Y + adjbottom));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ProfileTimer.Pop(profileDepth);
|
ProfileTimer.Pop(profileDepth);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user