bonjour,
je fais actuellement un projet auquel je souhaite faire une rotation d'image or la rotation d'image se fait a l'angle Top,Left et j'aimerais pouvoir avoir un point de rotation au centre de l'image.
voici mon code actuellement :
publicpartialclassForm1 : Form{
float angle = 0F;public Form1(){
InitializeComponent();
}
privatevoid timer1_Tick(object sender, EventArgs e){
angle += 1F;
pictureBox1.Invalidate();
Text = angle.ToString();
}
privatevoid pictureBox1_Paint(object sender, PaintEventArgs e){
Graphics gScreen = e.Graphics;Bitmap bmp = newBitmap(global::WindowsApplication1.Properties.Resources._38);gScreen.RotateTransform(angle, System.Drawing.Drawing2D.
MatrixOrder.Append);gScreen.DrawImage(bmp,
newRectangle(0, 0, pictureBox1.Width, pictureBox1.Height));}
}