我想实现一个BMP图片按随机变化的角度和按该图片的中心点旋转,哪位可以演示一下啊?

解决方案 »

  1.   

           private void Form1_MouseUp(object sender, MouseEventArgs e)
            {
                Graphics nGraphics=this.CreateGraphics();
                nGraphics.TranslateTransform(100.0F, 100.0F);
                nGraphics.DrawImage(pictureBox1.Image, 0, 0);            nGraphics.RotateTransform(10.0F);
                nGraphics.DrawImage(pictureBox1.Image,0, 0);            nGraphics.RotateTransform(10.0F);
                nGraphics.DrawImage(pictureBox1.Image, 0, 0);            nGraphics.RotateTransform(10.0F);
                nGraphics.DrawImage(pictureBox1.Image, 0, 0);            nGraphics.Dispose();        }http://www.mybuffet.cn
      

  2.   

    using (Bitmap bmp = new Bitmap(@"d:\A.bmp")) 
                { 
                    Graphics g = this.CreateGraphics(); 
                    Rectangle rect = new Rectangle(0, 0, 100, 100);  
                    bmp.RotateFlip(RotateFlipType.RotateNoneFlipX); 
                    g.DrawImage(bmp, rect); 
              }http://topic.csdn.net/u/20080820/08/6dc218db-fbe0-41f6-bd1b-95e2545596a9.html