Changed the tic marks of the bottom ruler to be in units of inches. (used internally for debugging)
This commit is contained in:
parent
4cd656d09a
commit
013643c6c7
@ -359,18 +359,29 @@ namespace Volian.Print.Library
|
||||
cb.LineTo(792, (float)myPageHelper.BottomContent);
|
||||
}
|
||||
int i = 0;
|
||||
for (float y = yBottom; y <= yTop; y += 10)
|
||||
for (float y = yBottom; y <= yTop; y += 12)
|
||||
{
|
||||
float w = 10;
|
||||
if (i % 10 == 0) w = 30;
|
||||
else if (i % 5 == 0) w = 20;
|
||||
if (i % 6 == 0) w = 30;
|
||||
else if (i % 3 == 0) w = 20;
|
||||
cb.SetLineWidth(w / 30);
|
||||
i++;
|
||||
cb.MoveTo(x + w, y);
|
||||
cb.LineTo(x, y);
|
||||
cb.Stroke();
|
||||
}
|
||||
i = 0;
|
||||
for (float y = yBottom; y <= yTop; y += 10)
|
||||
{
|
||||
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;
|
||||
cb.Stroke();
|
||||
cb.RestoreState();
|
||||
cb.EndLayer();
|
||||
@ -561,6 +572,7 @@ namespace Volian.Print.Library
|
||||
cb.SetLineWidth(.1F);
|
||||
cb.SetColorStroke(new Color(System.Drawing.Color.CornflowerBlue));
|
||||
float yTop = (float)(cb.PdfWriter.PageSize.Height - layout.TopMargin);
|
||||
//Console.WriteLine("Page,yTop,yTopMargin {0},{1},{2}", cb.PdfDocument.PageNumber, yTop, YTopMargin);
|
||||
if(YTopMargin != null) yTop = (float)YTopMargin;
|
||||
float yBottom = (float)(cb.PdfWriter.PageSize.Height - (layout.TopMargin + layout.PageLength));
|
||||
//Console.WriteLine("'{0}',{1},{2}", MySection.MyDocStyle.Name, yTop, yBottom);
|
||||
|
Loading…
x
Reference in New Issue
Block a user