Pen
Pen black_line = new Pen(Color.Black, 1);
Brush
SolidBrush black_brush = new SolidBrush(Color.Black);
Przykład zastosowania
Pen black_line = new Pen(Color.Black, 1);
SolidBrush black_brush = new SolidBrush(Color.Black);
PointF x1 = new PointF(0, 200);
PointF x2 = new PointF(400, 200);
PointF y1 = new PointF(200, 0);
PointF y2 = new PointF(200, 400);
e.Graphics.DrawLine(black_line2, x1, x2);
e.Graphics.DrawLine(black_line2, y1, y2);
Rectangle rect = new Rectangle(196, 196, 8, 8);
e.Graphics.FillEllipse(black_brush, rect);