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

HatchDiagonalBrick() static private method

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

            initializeContext(context, hatchHeight, false);

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

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

            hatchHeight -= 1;
            hatchWidth -= 1;

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

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