System.Drawing.Drawing2D.HatchBrush.HatchDiagonalCross C# (CSharp) Method

HatchDiagonalCross() static private method

static private HatchDiagonalCross ( CGContext context ) : void
context CGContext
return void
        void HatchDiagonalCross(CGContext context)
        {
            var hatchWidth = getHatchWidth (hatchStyle);
            var hatchHeight = getHatchHeight (hatchStyle);
            var lineWidth = getLineWidth (hatchStyle);

            initializeContext(context, hatchHeight, true);

            /* draw background */
            drawBackground (context, backColor, hatchWidth, hatchHeight);

            /* draw lines in the foreground color */
            context.SetStrokeColor(foreColor.ToCGColor());
            context.SetLineWidth(lineWidth);
            context.SetLineCap(CGLineCap.Square);

            float halfMe = hatchHeight / 2.0f;

            context.MoveTo(0, 0);
            context.AddLineToPoint(hatchWidth, hatchHeight);
            context.StrokePath();

            context.MoveTo(hatchWidth, 0);
            context.AddLineToPoint(0, hatchHeight);
            context.StrokePath();
        }