OnePerMeter : Alignment

This commit is contained in:
Milan Hanajik
2023-11-09 17:44:00 +01:00
parent c4c86b36d2
commit 8318ed33e1
6 changed files with 320 additions and 187 deletions
@@ -313,7 +313,15 @@ namespace Results.Output.Printers.OnePerMeter
}
SizeF size = table.Measure(e);
float tableLeft = (float)leftMargin + ((float)printWidth - size.Width) / 2;
float sideMargin = (printWidth - size.Width) / 2;
float tableLeft;
switch (cfg.Alignment)
{
case Alignment.Left: tableLeft = leftMargin; break;
default:
case Alignment.Center: tableLeft = leftMargin + sideMargin; break;
case Alignment.Right: tableLeft = leftMargin + 2 * sideMargin; break;
}
belowTop = table.Draw(e, tableLeft, tableTop);
if (pageNr == nrPages)
@@ -34,6 +34,7 @@ namespace Results.Output.Printers.OnePerMeter
public string[] CommonItems2;
public string[] CommonItems3;
public Common.TableForm Form;
public Common.Alignment Alignment;
public string[] TestItems;
public string[] TestItems2;
public int BelowW0Pct;