If you are using
System.Drawing
,
StringFormat
might be not universal enough for you.
This is one much more universal tool which will allow you to change orientation and do other linear transformations with ease. What you need is the property
System.Drawing.Graphics.Transform
, please see
http://msdn.microsoft.com/en-us/library/system.drawing.graphics.transform.aspx[
^].
You can assign different values to the property
Trasform
in the middle of rendering. For example, assign instance of transform, draw a string vertically, restore transform to the saved default value or change its orientation — draw another string horizontally or at the angle or draw something else.
You can apply any affine transform. For example, this method is the only way to render, say, a text written on a wall of a box depicted at the angle in some projection…
—SA