Ejemplo n.º 1
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);
			
		}
Ejemplo n.º 2
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);
                }
            }
        }
Ejemplo n.º 3
0
 public void DrawBorder(Graphics graphics, Rectangle rectangle)
 {
     if (graphics == null)
     {
         throw new ArgumentNullException("graphics");
     }
     using (Pen p = baseline.CreatePen(baseline.Thickness)) {
         Rectangle r = System.Drawing.Rectangle.Inflate(rectangle, 1, 1);
         graphics.DrawRectangle(p, rectangle);
     }
 }
Ejemplo n.º 4
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);
				}
			}
		}
Ejemplo n.º 5
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);
         }
     }
 }
Ejemplo n.º 6
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);
                }
            }
        }
Ejemplo n.º 7
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);
				}
			}
		}
Ejemplo n.º 8
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);
				}
			}
		}