System.Windows.Forms.ThemeWin32Classic.DrawTodayCircle C# (CSharp) Method

DrawTodayCircle() private method

private DrawTodayCircle ( Graphics dc, Rectangle rectangle ) : void
dc System.Drawing.Graphics
rectangle System.Drawing.Rectangle
return void
		private void DrawTodayCircle (Graphics dc, Rectangle rectangle) {
			Color circle_color = Color.FromArgb (248, 0, 0);
			// draw the left hand of the circle 
			Rectangle lhs_circle_rect = new Rectangle (rectangle.X + 1, rectangle.Y + 4, Math.Max(rectangle.Width - 2, 0), Math.Max(rectangle.Height - 5, 0));
			Rectangle rhs_circle_rect = new Rectangle (rectangle.X + 1, rectangle.Y + 1, Math.Max(rectangle.Width - 2, 0), Math.Max(rectangle.Height - 2, 0));
			Point [] curve_points = new Point [3];
			curve_points [0] = new Point (lhs_circle_rect.X, rhs_circle_rect.Y + rhs_circle_rect.Height/12);
			curve_points [1] = new Point (lhs_circle_rect.X + lhs_circle_rect.Width/9, rhs_circle_rect.Y);
			curve_points [2] = new Point (lhs_circle_rect.X + lhs_circle_rect.Width/2 + 1, rhs_circle_rect.Y);

			Pen pen = ResPool.GetSizedPen(circle_color, 2);
			dc.DrawArc (pen, lhs_circle_rect, 90, 180);
			dc.DrawArc (pen, rhs_circle_rect, 270, 180);					
			dc.DrawCurve (pen, curve_points);
			dc.DrawLine (ResPool.GetPen (circle_color), curve_points [2], new Point (curve_points [2].X, lhs_circle_rect.Y));
		}
ThemeWin32Classic