TextureBrush MyBrush=new TextureBrush(tmpBmp);
this.picPreview.Refresh();
e.Graphics.TranslateTransform(iRotX,iRotY);
MyBrush.RotateTransform(iAngle);
e.Graphics.TranslateTransform(-iRotX,-iRotY);
e.Graphics.FillRectangle(MyBrush,0,0,this.ClientRectangle.Width,this.ClientRectangle.Height);我要在此基础上将tmpBmp截取 请问我改怎么做?

解决方案 »

  1.   

    到MSDN中查下Graphics.DrawImage()~裏面有好多重載
    也可以自己寫函數~~圖片只是一組二維數組,當然還有文件格式,這個都有現成的,簡單的圖形操作樓主應該學會
      

  2.   

    Bitmap   b=(Bitmap)Image.FromFile("");   
    Bitmap   bmp=b.Clone(new   System.Drawing.Rectangle(0,0,20,20),System.Drawing.Imaging.PixelFormat.Format32bppPArgb);   
      
    Image   image   =   System.Drawing.Image.FromFile("a.jpg",true);   
      Bitmap   bmp   =   new   Bitmap(400,400);   
      Graphics   grap   =   Graphics.FromImage(bmp);   
      grap.Clear(Color.Transparent);   
      grap.DrawImage(image,new   Rectangle(0,0,400,400));   
      

  3.   

    更简单的是用Graphics.Copyofscreen