Exemple #1
0
        public void DrawBorder(iTextSharp.text.pdf.PdfContentByte contentByte,
                               iTextSharp.text.Rectangle rectangle,
                               ICSharpCode.Reports.Core.Exporter.IBaseStyleDecorator style)
        {
            if (contentByte == null)
            {
                throw new ArgumentNullException("contentByte");
            }

            contentByte.SetColorStroke(style.PdfFrameColor);
            contentByte.SetLineWidth(UnitConverter.FromPixel(baseline.Thickness).Point);

            contentByte.MoveTo(rectangle.Left, rectangle.Top);

            contentByte.LineTo(rectangle.Left, rectangle.Top - rectangle.Height);

            contentByte.LineTo(rectangle.Left + rectangle.Width, rectangle.Top - rectangle.Height);

            contentByte.LineTo(rectangle.Left + rectangle.Width, rectangle.Top);

            contentByte.LineTo(rectangle.Left, rectangle.Top);

            contentByte.FillStroke();
            contentByte.ResetRGBColorFill();
        }