MonoHotDraw.Samples.AnalogClockFigure.DrawClockHands C# (CSharp) Method

DrawClockHands() private method

private DrawClockHands ( Context context, double radians, double thickness, double length, Color color ) : void
context Cairo.Context
radians double
thickness double
length double
color Color
return void
        private void DrawClockHands(Context context, double radians, double thickness, 
			                             double length, Color color)
        {
            PointD a;
            PointD b;
            PointD c;

            a = new PointD ((_centerX + thickness * 2 * Math.Sin (radians + Math.PI / 2)),
                (_centerY - thickness * 2 * Math.Cos (radians + Math.PI / 2)));
            context.MoveTo (a);

            b = new PointD ((_centerX + thickness * 2 * Math.Sin (radians - Math.PI / 2)),
                (_centerY - thickness * 2 * Math.Cos (radians - Math.PI / 2)));
            context.LineTo (b.X, b.Y);

            c = new PointD ((_centerX + length * Math.Sin (radians)),
                (_centerY - length * Math.Cos (radians)));
            context.LineTo (c.X, c.Y);

            context.Color = color;
            context.FillPreserve ();

            context.Stroke ();
        }