BattleShip.casePlatform.DisplayCross C# (CSharp) Метод

DisplayCross() публичный Метод

display a red cross inside a case
public DisplayCross ( Graphics g, int x, int y ) : void
g System.Drawing.Graphics
x int coordinate x of the case
y int coordinate y of the case
Результат void
        public void DisplayCross(Graphics g, int x, int y)
        {
            this.p = new Pen(this.CrossColor, 3);

            Point point1 = new Point(x + this.Size / LOCATION_VARIATION, y + this.Size / LOCATION_VARIATION);
            Point point1End = new Point(x + this.Size / LOCATION_VARIATION * 3, y + this.Size / LOCATION_VARIATION * 3);
            Point point2 = new Point(x + this.Size / LOCATION_VARIATION * 3, y + this.Size / LOCATION_VARIATION);
            Point point2End = new Point(x + this.Size / LOCATION_VARIATION, y + this.Size / LOCATION_VARIATION * 3);

            g.DrawLine(p, point1, point1End);
            g.DrawLine(p, point2, point2End);
        }