Example #1
0
		private LineDecorator CreateLineShape ()
		{
			LineDecorator ld = new LineDecorator(this.shape);
			ld.Size = this.Size;
			ld.Location = this.Location;
			ld.BackColor = this.BackColor;
			ld.ForeColor = this.ForeColor;
			
			ld.Thickness = base.Thickness;
			ld.DashStyle = base.DashStyle;
			ld.From = this.fromPoint;
			ld.To = this.toPoint;
			return ld;
		}
Example #2
0
		private LineDecorator CreateLineShape ()
		{
			LineDecorator decorator = new LineDecorator(this.shape);
			decorator.Size = this.Size;
			decorator.Location = this.Location;
			decorator.BackColor = this.BackColor;
			decorator.ForeColor = this.ForeColor;
			
			decorator.Thickness = base.Thickness;
			decorator.DashStyle = base.DashStyle;
			decorator.From = this.FromPoint;
			decorator.To = this.ToPoint;
			return decorator;
		}
Example #3
0
        private void GraphicsLineDrawer(Graphics graphics)
        {
            LineDecorator lineStyle = base.StyleDecorator as LineDecorator;

            BaseLine baseLine = null;

            baseLine = new BaseLine(lineStyle.ForeColor, lineStyle.DashStyle, lineStyle.Thickness);

            Point from = new Point(lineStyle.DisplayRectangle.Left + lineStyle.From.X,
                                   lineStyle.DisplayRectangle.Top + lineStyle.From.Y);
            Point to = new Point(lineStyle.DisplayRectangle.Left + lineStyle.To.X,
                                 lineStyle.DisplayRectangle.Top + lineStyle.To.Y);

            lineStyle.Shape.DrawShape(graphics,
                                      baseLine,
                                      from,
                                      to);
        }
Example #4
0
        private void PdfLineDrawer(PdfWriter pdfWriter)
        {
            LineDecorator lineStyle = base.StyleDecorator as LineDecorator;

            if (lineStyle != null)
            {
                iTextSharp.text.Rectangle r = base.ConvertToPdfRectangle();
                int l = lineStyle.DisplayRectangle.Left + lineStyle.From.X;

                Point from = new Point((int)UnitConverter.FromPixel(l),
                                       (int)r.Top - (int)UnitConverter.FromPixel(lineStyle.From.Y));


                l = lineStyle.DisplayRectangle.Left + lineStyle.To.X;

                Point to = new Point((int)UnitConverter.FromPixel(l),
                                     (int)r.Top - (int)UnitConverter.FromPixel(lineStyle.To.Y));

                lineStyle.Shape.DrawShape(base.PdfWriter.DirectContent,
                                          new BaseLine(lineStyle.ForeColor, lineStyle.DashStyle, lineStyle.Thickness),
                                          lineStyle,
                                          from, to);
            }
        }