Example #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.SetColorFill(style.PdfBackColor);
			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();
			
		}
Example #2
0
		protected static void FillBackGround (iTextSharp.text.pdf.PdfContentByte contentByte,
		                             IBaseStyleDecorator style,
		                             iTextSharp.text.Rectangle rectangle)
		{
				contentByte.SetColorFill(style.PdfBackColor);
				contentByte.Rectangle (rectangle.Left, rectangle.Top - rectangle.Height , rectangle.Width,rectangle.Height);
				contentByte.Fill();
		}