Hi I need to create a bitmap file from an string, currently I'm using
Bitmap b = new Bitmap(106, 21);
Font f = new Font("Tahoma",5 );
StringFormat sf = new StringFormat();
int faLCID = new System.Globalization.CultureInfo("fa-IR").LCID;
sf.SetDigitSubstitution(faLCID, StringDigitSubstitute.National);
Brush brush = Brushes.Black;
Point pos = new Point(2, 2);
Graphics c = Graphics.FromImage(b);
c.FillRectangle(Brushes.White, 0, 0, m_width, m_length);
c.DrawString(stringText, f, brush, pos,sf);
it works but the problem is it is writing left to right. How can I make DrawString() to write right-to-开发者_如何学Pythonleft? thanx
Pass StringFormatFlags.DirectionRightToLeft
.
精彩评论