[RESOLVED] c# rotate image
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7

Thread: [RESOLVED] c# rotate image

Threaded View

  1. #1
    Join Date
    Mar 2010
    Posts
    3

    [RESOLVED] c# rotate image

    hello
    the title says everything, i want to rotate an image but it dont rotate around his center it rotates in a circle around the form.

    Code:
    for(int i=0;i<500;i++)
    {
    Image m=Image.FromFile("C:/p1.png");
    using(Graphics g=this.CreateGraphics())
    {
    
    g.TranslateTransform(m.Width/2,m.Height/2);
    
    
    g.RotateTransform(i);
    g.TranslateTransform(-m.Width/2,-m.Height/2);
    g.DrawImage(m,new Point(100,100));
    
    
    }
    }
    if I put in DrawImage(m,0,0) i works great but i dont want to rotate the image in the corner.
    sorry for the english but I think you understud what I ask
    Last edited by HanneSThEGreaT; March 19th, 2010 at 03:56 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center