I'm using the the drawstring method of Graphics class to draw a String on Image.
g.DrawString(mytext, font, brush, 0, 0);
I'm trying to rotate the text by angle using the Rotate Transform Function of the graphic object so that the text can be drawn at any angle.How can i do it using Rotate Transform. The rotate Transform Code i used is
Bitmap m = new Bitmap(pictureBox1.Image);
Graphics x=Graphics.FromImage(m);
x.RotateTransform(30);
SolidBrush brush = new SolidBrush(Color.Red);
x.DrawString("hi", font,brush,image.Width/2,image.Height/2);
//image=picturebox1.image
pictureBox1.Image = m;
The Text is Drawn at a rotated angle but it is not drawn at the centre as i want.Plz help me out.