Beispiel #1
0
        /// <summary>
        /// 绘制下一块
        /// </summary>
        private void Next_paint(PictureBox pb, Pattern pt)
        {
            Bitmap   bp = new Bitmap(pb.Size.Width, pb.Size.Height);
            Graphics bg = Graphics.FromImage(bp);

            for (int i = 0; i < 4; i++)
            {
                pt.cubes[i].j += 2;
            }
            pt.drawPattern(bg, grid);
            for (int i = 0; i < 4; i++)
            {
                pt.cubes[i].j -= 2;
            }
            for (int i = 0; i <= 4; i++)
            {
                bg.DrawLine(new Pen(Color.LightSlateGray), 3 * grid, i * grid, 7 * grid, i * grid);
            }
            for (int i = 0; i <= 4; i++)
            {
                bg.DrawLine(new Pen(Color.LightSlateGray), (i + 3) * grid, 0, (i + 3) * grid, 4 * grid);
            }

            pb.BackgroundImage = bp;
        }
Beispiel #2
0
 private void FriendCurrent_Paint(Graphics g)
 {
     if (friendCurrent != null)
     {
         friendCurrent.drawPattern(g, grid);
     }
 }
Beispiel #3
0
 /// <summary>
 /// 画出当前块
 /// </summary>
 private void Current_Paint(Pattern pt, Graphics g)
 {
     pt.drawPattern(g, grid);
 }
Beispiel #4
0
 //绘制当前
 private void Current_Paint(Graphics g)
 {
     current.drawPattern(g, grid);
 }