Added Property yVeryBottom
Changed the format of the Verical Ruler in the Debug PDF Layer to start at the top margin and extend to the bottom margin. Partial fix of the logic to display an XY Plot.
This commit is contained in:
@@ -182,13 +182,15 @@ namespace Volian.Print.Library
|
||||
private void DrawRuler(PdfContentByte cb)
|
||||
{
|
||||
if (DebugLayer == null) return;
|
||||
Layout layout = MySection.MyDocStyle.Layout;
|
||||
cb.SaveState();
|
||||
cb.BeginLayer(DebugLayer);
|
||||
float x = (cb.PdfWriter.PageSize.Left + cb.PdfWriter.PageSize.Right) / 2;
|
||||
cb.SetLineWidth(.1F);
|
||||
cb.SetColorStroke(new Color(System.Drawing.Color.CornflowerBlue));
|
||||
float yTop = 648;
|
||||
float yBottom = 48;
|
||||
float yTop = (float)(cb.PdfWriter.PageSize.Height - layout.TopMargin);
|
||||
float yBottom = (float)(cb.PdfWriter.PageSize.Height - (layout.TopMargin + layout.PageLength));
|
||||
Console.WriteLine("'{0}',{1},{2}", MySection.MyDocStyle.Name, yTop, yBottom);
|
||||
cb.MoveTo(x, yTop);
|
||||
cb.LineTo(x, yBottom);
|
||||
int i = 0;
|
||||
@@ -197,9 +199,11 @@ namespace Volian.Print.Library
|
||||
float w = 10;
|
||||
if (i % 10 == 0) w = 30;
|
||||
else if (i % 5 == 0) w = 20;
|
||||
cb.SetLineWidth(w / 30);
|
||||
i++;
|
||||
cb.MoveTo(x - w, y);
|
||||
cb.LineTo(x, y);
|
||||
cb.Stroke();
|
||||
}
|
||||
i = 0;
|
||||
for (float y = yTop; y >= yBottom; y -= 10.1F)
|
||||
@@ -207,11 +211,13 @@ namespace Volian.Print.Library
|
||||
float w = 10;
|
||||
if (i % 10 == 0) w = 30;
|
||||
else if (i % 5 == 0) w = 20;
|
||||
cb.SetLineWidth(w / 30);
|
||||
i++;
|
||||
cb.MoveTo(x + w, y-1);
|
||||
cb.LineTo(x, y-1);
|
||||
cb.Stroke();
|
||||
}
|
||||
Layout layout = MySection.MyDocStyle.Layout;
|
||||
cb.SetLineWidth(.1F);
|
||||
cb.Rectangle((float)layout.LeftMargin, (float)(cb.PdfWriter.PageSize.Height - layout.TopMargin), (float)layout.PageWidth - (float)layout.LeftMargin, (float)-layout.PageLength);
|
||||
float yRuler = 612;
|
||||
cb.MoveTo(0, yRuler);
|
||||
|
Reference in New Issue
Block a user