According to msdn: http://www.microsoft.com/middleeast/msdn/arabicsupp.aspx
How GDI+ Support Arabic?
GDI+ supports Arabic text manipul
You could make a very simple coordinate transformation:
public static class CoordinateConverter
{
public static RectangleF Convert(RectangleF source, RectangleF drawArea)
{
// I assume drawArea.X to be 0
return new RectangleF(
drawArea.Width - source.X - source.Width,
source.Y,
source.Width,
source.Height);
}
public static RectangleF ConvertBack(Rectangle source, RectangleF drawArea)
{
return new RectangleF(
source.X + source.Width - drawArea.Width,
source.Y,
source.Width,
source.Height);
}
}
Now every time you want something texty to be drawn, you can use this converter to change the coordinates. Of course you could also ref a rectangle so you don't create new ones all the time. But the principle stays the same. I hope I understood your question correctly.
Use StringFormatFlags.DirectionRightToLeft, like this:
StringFormat format = new StringFormat(StringFormatFlags.DirectionRightToLeft);
e.Graphics.DrawString("سلام",
this.Font,
new SolidBrush(Color.Red),
r1,
format);