注册 登录
编程论坛 ASP.NET技术论坛

求教!图片的动画显示

abc69690 发布于 2010-11-21 10:28, 434 次点击
实现图片的交错(左右交错、上下交错、左三分之一右三分之二交错、上三分之一下三分之二交错)切换的动画切换效果。
实在不知道所谓的交错效果是什么样的。。。。

对接效果做出来了 ,觉得应该跟这个属于同一类。。。

private void 上下对接ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            box = new Bitmap(pictureBox1.Image);
            try
            {
                width = this.pictureBox1.Image.Width;
                height = this.pictureBox1.Image.Height;
                Graphics g = this.pictureBox1.CreateGraphics();
                g.Clear(this.BackColor);
                Bitmap bmp = new Bitmap(width, height);
                int x = 0;
                while (x <= height / 2)
                {
                    for (int i = 0; i <= width - 1; i++)
                    {
                        bmp.SetPixel(i, x, box.GetPixel(i, x));
                    }
                    for (int i = 0; i <= width - 1; i++)
                    {
                        bmp.SetPixel(i, height - x - 1, box.GetPixel(i, height - x - 1));
                    }
                    x++;

                    g.DrawImage(bmp, 0, 0);

                }
            }
2 回复
#2
wangnannan2010-11-22 08:35
没明白楼主要表达什么意思
#3
筱晓绾2010-11-22 08:38
用了Try 怎么没有用catch呢?把异常给捕获,看他报什么错!
1