Search code examples
c#imagevisual-studio-2005gdidrawstring

How can drawString method be used for writing diagonal way


I am using c# 2005 i want to write string diagonally on image. But by default c# provides the option to write horizontally or vertically.

how we write diagonally?

Thanks


Solution

  • Do a Graphics.rotateTransform before the drawString call. Don't forget to reverse the change afterwards, as Phil Wright points out.