diff --git a/PROMS/Volian.Print.Library/vlnBox.cs b/PROMS/Volian.Print.Library/vlnBox.cs index ede8a9b1..4b7fbf9d 100644 --- a/PROMS/Volian.Print.Library/vlnBox.cs +++ b/PROMS/Volian.Print.Library/vlnBox.cs @@ -37,6 +37,7 @@ namespace Volian.Print.Library } public const string BoxThin = "\x2510.\x2500.\x250c.\x2502. . .\x2518.\x2514. .\x2500. . "; const string BoxThick = "\x2584.\x2584.\x2584.\x2588. . .\x2580.\x2580. .\x2580. . "; + const string BoxDouble = "\x2557.\x2550.\x2554.\x2551. . .\x255D.\x255A. .\x2550. . "; public override float ToPdf(PdfContentByte cb, float yPageStart, float yTopMargin, float yBottomMargin) { cb.SaveState(); @@ -58,24 +59,34 @@ namespace Volian.Print.Library } else { + const float llxOffset = 3; float lineThickness = 0; switch (MyBox.BoxStyle) { case BoxThin: lineThickness = .6F; + cb.SetLineWidth(lineThickness); + cb.Rectangle(left + llxOffset, bottom + (lineThickness / 2), right - left, (Height - lineThickness) * MyPageHelper.YMultiplier); break; case BoxThick: lineThickness = 6; + cb.SetLineWidth(lineThickness); + cb.Rectangle(left + llxOffset, bottom + (lineThickness / 2), right - left, (Height - lineThickness) * MyPageHelper.YMultiplier); + break; + case BoxDouble: + lineThickness = .6F; + cb.SetLineWidth(lineThickness); + // outer rectangle (rectangle's are defined as x,y,w,h) + cb.Rectangle(left + llxOffset - lineThickness * 1.5F, bottom - lineThickness, right - left + lineThickness * 3, (Height + lineThickness * 2) * MyPageHelper.YMultiplier); + // inner rectangle + cb.Rectangle(left + llxOffset + lineThickness, bottom + lineThickness * 1.5F, right - left - lineThickness * 2, (Height - lineThickness * 3) * MyPageHelper.YMultiplier); break; default: - // For other than OHLP/HLP. For those not matching the HLP Boxes + // For other than thick, thin and double. Console.WriteLine("NO BOXES"); break; //throw new Exception("Missing vlnBox handler"); } - const float llxOffset = 3; - cb.SetLineWidth(lineThickness); - cb.Rectangle(left + llxOffset, bottom + (lineThickness / 2), right - left, (Height - lineThickness) * MyPageHelper.YMultiplier); } cb.Stroke(); if (textLayer != null) cb.EndLayer();