Esempio n. 1
0
		//	http://www.mikesdotnetting.com/Article/88/iTextSharp-Drawing-shapes-and-Graphics
		
		public override void CreatePath(iTextSharp.text.pdf.PdfContentByte contentByte,
		                                BaseLine line,
		                                IBaseStyleDecorator style,
		                                iTextSharp.text.Rectangle rectangle)
		{
		
			if (contentByte == null) {
				throw new ArgumentNullException("contentByte");
			}
		
			if (style == null) {
				throw new ArgumentNullException("style");
			}
			if (rectangle == null) {
				throw new ArgumentNullException("rectangle");
			}
		
			if (line == null) {
				BaseShape.FillBackGround(contentByte,style,rectangle);
			} 
			else
			{
				BaseShape.SetupShape(contentByte,style);
				contentByte.SetLineWidth(UnitConverter.FromPixel(line.Thickness).Point);
				contentByte.RoundRectangle(rectangle.Left, rectangle.Bottom, rectangle.Width, rectangle.Height, CornerRadius);
				BaseShape.FinishShape(contentByte);
			}
		}
Esempio n. 2
0
		public override void CreatePath(iTextSharp.text.pdf.PdfContentByte contentByte,
		                                BaseLine line,
		                                IBaseStyleDecorator style,
		                                iTextSharp.text.Rectangle rectangle)
		{
			if (contentByte == null) {
				throw new ArgumentNullException("contentByte");
			}
			if (style == null) {
				throw new ArgumentNullException("style");
			}
			if (rectangle == null) {
				throw new ArgumentNullException("rectangle");
			}
			
			if ((line == null)||(line.Thickness < 1)) {
				BaseShape.FillBackGround(contentByte,style,rectangle);
			}
			else if ((style.BackColor == GlobalValues.DefaultBackColor)) {
				BaseShape.SetupShape(contentByte,style);
				contentByte.SetLineWidth(UnitConverter.FromPixel(line.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);
				BaseShape.FinishShape(contentByte);
			} else {
				BaseShape.FillBackGround(contentByte,style,rectangle);
			}
		}
Esempio n. 3
0
 public override void CreatePath(iTextSharp.text.pdf.PdfContentByte contentByte,
                                 BaseLine line,
                                 IBaseStyleDecorator style,
                                 iTextSharp.text.Rectangle rectangle)
 {
     throw new NotImplementedException();
 }
Esempio n. 4
0
 public void DrawShape(PdfContentByte cb,
                       BaseLine line,
                       IBaseStyleDecorator style,
                       iTextSharp.text.Rectangle r)
 {
     this.CreatePath(cb, line, style, r);
 }
Esempio n. 5
0
 public void DrawShape(PdfContentByte cb,
                       BaseLine line,
                       IBaseStyleDecorator style,
                       Point from, Point to)
 {
     this.CreatePath(cb, line, style, from, to);
 }
Esempio n. 6
0
        public override void Render(ReportPageEventArgs rpea)
        {
            if (rpea == null)
            {
                throw new ArgumentNullException("rpea");
            }
            base.Render(rpea);
            Rectangle rectangle = base.DisplayRectangle;

            StandardPrinter.FillBackground(rpea.PrintPageEventArgs.Graphics, this.BaseStyleDecorator);

            BaseLine line = new BaseLine(base.ForeColor, base.DashStyle, base.Thickness, LineCap.Round, LineCap.Round, DashCap.Round);

            using (Pen pen = line.CreatePen(line.Thickness)){
                if (pen != null)
                {
                    shape.CornerRadius = this.CornerRadius;

                    GraphicsPath gfxPath = shape.CreatePath(rectangle);

                    rpea.PrintPageEventArgs.Graphics.FillPath(new SolidBrush(BackColor), gfxPath);;
                    rpea.PrintPageEventArgs.Graphics.DrawPath(pen, gfxPath);
                }
            }
        }
Esempio n. 7
0
		public override void CreatePath(iTextSharp.text.pdf.PdfContentByte contentByte,
		                                BaseLine line,
		                                IBaseStyleDecorator style,
		                                Point from,Point to)
		{
			throw new NotImplementedException();
		}
Esempio n. 8
0
        //	http://www.mikesdotnetting.com/Article/88/iTextSharp-Drawing-shapes-and-Graphics

        public override void CreatePath(iTextSharp.text.pdf.PdfContentByte contentByte,
                                        BaseLine line,
                                        IBaseStyleDecorator style,
                                        iTextSharp.text.Rectangle rectangle)
        {
            if (contentByte == null)
            {
                throw new ArgumentNullException("contentByte");
            }

            if (style == null)
            {
                throw new ArgumentNullException("style");
            }
            if (rectangle == null)
            {
                throw new ArgumentNullException("rectangle");
            }

            if (line == null)
            {
                BaseShape.FillBackGround(contentByte, style, rectangle);
            }
            else
            {
                BaseShape.SetupShape(contentByte, style);
                contentByte.SetLineWidth(UnitConverter.FromPixel(line.Thickness).Point);
                contentByte.RoundRectangle(rectangle.Left, rectangle.Bottom, rectangle.Width, rectangle.Height, CornerRadius);
                BaseShape.FinishShape(contentByte);
            }
        }
Esempio n. 9
0
        public override void CreatePath(iTextSharp.text.pdf.PdfContentByte contentByte,
                                        BaseLine line,
                                        IBaseStyleDecorator style,
                                        iTextSharp.text.Rectangle rectangle)
        {
            if (contentByte == null)
            {
                throw new ArgumentNullException("contentByte");
            }
            if (rectangle == null)
            {
                throw new ArgumentNullException("rectangle");
            }

            if ((line == null) || (line.Thickness < 1))
            {
                BaseShape.FillBackGround(contentByte, style, rectangle);
            }
            else if ((style.BackColor == GlobalValues.DefaultBackColor))
            {
                BaseShape.SetupShape(contentByte, style);
                contentByte.SetLineWidth(UnitConverter.FromPixel(line.Thickness).Point);
                contentByte.Ellipse(rectangle.Left,
                                    rectangle.Top,
                                    rectangle.Left + rectangle.Width,
                                    rectangle.Top - rectangle.Height);
                BaseShape.FinishShape(contentByte);
            }
            else
            {
                BaseShape.FillBackGround(contentByte, style, rectangle);
            }
        }
Esempio n. 10
0
		public override void Draw(Graphics graphics)
		{
			if (graphics == null) {
				throw new ArgumentNullException("graphics");
			}
			
			Rectangle rect = new Rectangle(this.ClientRectangle.Left,this.ClientRectangle.Top,
			                               this.ClientRectangle.Right -1,
			                               this.ClientRectangle.Bottom -1);
//			backgroundShape.FillShape(graphics,
//			                new SolidFillPattern(this.BackColor),
//			                rect);
			
			Border b = new Border(new BaseLine (this.ForeColor,System.Drawing.Drawing2D.DashStyle.Solid,1));
//			DrawFrame(graphics,b);
			BaseLine line = new BaseLine(base.ForeColor,DashStyle,Thickness,LineCap.Round,LineCap.Round,DashCap.Round);
			using (Pen pen = line.CreatePen(line.Thickness)){
				shape.CornerRadius = this.CornerRadius;
				GraphicsPath path1 = shape.CreatePath(rect);
				graphics.DrawPath(pen, path1);
				
			}
			
//			shape.DrawShape (graphics,
//			                 this.Baseline(),
//			                 rect);
			
		}
Esempio n. 11
0
		public Border(BaseLine baseLine)
		{
			this.baseline = baseLine;
			this.left = baseLine;
			this.top = baseLine;
			this.right = baseLine;
			this.bottom = baseLine;
		}
Esempio n. 12
0
 public Border(BaseLine baseLine)
 {
     this.baseline = baseLine;
     this.left     = baseLine;
     this.top      = baseLine;
     this.right    = baseLine;
     this.bottom   = baseLine;
 }
Esempio n. 13
0
		public override void CreatePath(iTextSharp.text.pdf.PdfContentByte contentByte,
		                                BaseLine line,
		                                IBaseStyleDecorator style,
		                                Point from,Point to)
		{
			if (contentByte == null) {
				throw new ArgumentNullException("contentByte");
			}

			BaseShape.SetupShape(contentByte,style);
			contentByte.SetLineWidth(UnitConverter.FromPixel(line.Thickness).Point);
			contentByte.MoveTo(from.X,from.Y );
			contentByte.LineTo(to.X,to.Y);
			BaseShape.FinishShape(contentByte);
		}
Esempio n. 14
0
		// Draw a Line
		public void DrawShape(Graphics graphics, BaseLine line, Point from,Point to)
		{
			if (graphics == null) {
				throw new ArgumentNullException("graphics");
			}
			if (line == null) {
				throw new ArgumentNullException("line");
			}
			using (Pen pen = line.CreatePen(line.Thickness)){
				if (pen != null){
					GraphicsPath path1 = this.CreatePath(from,to);
					graphics.DrawPath(pen, path1);
				}
			}
		}
Esempio n. 15
0
        public override void CreatePath(iTextSharp.text.pdf.PdfContentByte contentByte,
                                        BaseLine line,
                                        IBaseStyleDecorator style,
                                        Point from, Point to)
        {
            if (contentByte == null)
            {
                throw new ArgumentNullException("contentByte");
            }

            BaseShape.SetupShape(contentByte, style);
            contentByte.SetLineWidth(UnitConverter.FromPixel(line.Thickness).Point);
            contentByte.MoveTo(from.X, from.Y);
            contentByte.LineTo(to.X, to.Y);
            BaseShape.FinishShape(contentByte);
        }
Esempio n. 16
0
 // Draw a Line
 public void DrawShape(Graphics graphics, BaseLine line, Point from, Point to)
 {
     if (graphics == null)
     {
         throw new ArgumentNullException("graphics");
     }
     if (line == null)
     {
         throw new ArgumentNullException("line");
     }
     using (Pen pen = line.CreatePen(line.Thickness)){
         if (pen != null)
         {
             GraphicsPath path1 = this.CreatePath(from, to);
             graphics.DrawPath(pen, path1);
         }
     }
 }
Esempio n. 17
0
        public virtual void DrawShape(Graphics graphics, BaseLine line, Rectangle rectangle)
        {
            if (graphics == null)
            {
                throw new ArgumentNullException("graphics");
            }
            if (line == null)
            {
                throw new ArgumentNullException("line");
            }

            using (Pen pen = line.CreatePen(line.Thickness)){
                if (pen != null)
                {
                    GraphicsPath path1 = this.CreatePath(rectangle);
                    graphics.DrawPath(pen, path1);
                }
            }
        }
Esempio n. 18
0
		public override void Render(ReportPageEventArgs rpea) {
			if (rpea == null) {
				throw new ArgumentNullException("rpea");
			}
			base.Render(rpea);
			Rectangle rectangle = base.DisplayRectangle;
			StandardPrinter.FillBackground(rpea.PrintPageEventArgs.Graphics,this.BaseStyleDecorator);
			
			BaseLine line = new BaseLine(base.ForeColor,base.DashStyle,base.Thickness,LineCap.Round,LineCap.Round,DashCap.Round);
			
			using (Pen pen = line.CreatePen(line.Thickness)){
				if (pen != null)
				{
					shape.CornerRadius = this.CornerRadius;

					GraphicsPath gfxPath = shape.CreatePath(rectangle);
					
					rpea.PrintPageEventArgs.Graphics.FillPath(new SolidBrush(BackColor), gfxPath);;
					rpea.PrintPageEventArgs.Graphics.DrawPath(pen, gfxPath);
				}
			}
		}
Esempio n. 19
0
		public virtual void DrawShape(Graphics graphics, BaseLine line, Rectangle rectangle)
		{
			if (graphics == null) {
				throw new ArgumentNullException("graphics");
			}
			if (line == null) {
				throw new ArgumentNullException("line");
			}
			
			using (Pen pen = line.CreatePen(line.Thickness)){
				if (pen != null){
					GraphicsPath path1 = this.CreatePath(rectangle);
					graphics.DrawPath(pen, path1);
				}
			}
		}
Esempio n. 20
0
		public void DrawShape(PdfContentByte cb,
		                      BaseLine line,
		                      IBaseStyleDecorator style,
		                      Point from,Point to)
		{
			this.CreatePath(cb,line,style,from,to);
		}
Esempio n. 21
0
		public override void DrawShape(Graphics graphics, BaseLine line, Rectangle rectangle)
		{
			base.DrawShape(graphics, line, rectangle);
		}
Esempio n. 22
0
 public override void DrawShape(Graphics graphics, BaseLine line, Rectangle rectangle)
 {
     base.DrawShape(graphics, line, rectangle);
 }
Esempio n. 23
0
 public abstract void CreatePath(PdfContentByte contentByte,
                                 BaseLine line,
                                 IBaseStyleDecorator style,
                                 Point from,
                                 Point to);
Esempio n. 24
0
 public abstract void CreatePath(PdfContentByte contentByte,
                                 BaseLine line,
                                 IBaseStyleDecorator style,
                                 iTextSharp.text.Rectangle rectangle);
Esempio n. 25
0
		public void DrawShape(PdfContentByte cb,
		                      BaseLine line,
		                      IBaseStyleDecorator style,
		                      iTextSharp.text.Rectangle r)
		{
			this.CreatePath(cb,line,style,r);
		}
Esempio n. 26
0
		public abstract void CreatePath (PdfContentByte contentByte,
		                                 BaseLine line,
		                                 IBaseStyleDecorator style,
		                                 iTextSharp.text.Rectangle rectangle);
Esempio n. 27
0
		public abstract void CreatePath (PdfContentByte contentByte,
		                                 BaseLine line,
		                                 IBaseStyleDecorator style,
		                                 Point from,
		                                Point to);