Si quieres un método para dibujar una cadena hace girar a la posición central cuerdas, a continuación, intente el método siguiente:
public void drawRotatedText(Bitmap bmp, int x, int y, float angle, string text, Font font, Brush brush)
{
Graphics g = Graphics.FromImage(bmp);
g.TranslateTransform(x, y); // Set rotation point
g.RotateTransform(angle); // Rotate text
g.TranslateTransform(-x, -y); // Reset translate transform
SizeF size = g.MeasureString(text, font); // Get size of rotated text (bounding box)
g.DrawString(text, font, brush, new PointF(x - size.Width/2.0f, y - size.Height/2.0f)); // Draw string centered in x, y
g.ResetTransform(); // Only needed if you reuse the Graphics object for multiple calls to DrawString
g.Dispose();
}
Saludos Hans fresado ...
ya he intentado esto, pero entonces todos mis gráficos dibujados se rotan. Eso no ayuda mucho. – eagle999
@ eagle999 use ResetTransform() cuando haya terminado de dibujar el texto girado –