I want to write a vertical text in my graphic instances using DrawString.
My code is like this :
var graph = Graphics.FromImage(map);
And I read the text and their position from Database :
graph.DrawString(ObjStationRepository.FindBy(i => i.Id == t.StationId).First().Description, new Font("B Nazanin", 18), Brushes.White, t.XLocation + 70, t.YLocation +80);
But my problem is ,i need to write the text in vertical position not horizontal .But DrawString write the text in horizontal !!
Best regards
Use
System.Drawing.StringFormat drawFormat = new System.Drawing.StringFormat();
drawFormat.FormatFlags = StringFormatFlags.DirectionVertical;
and add it as the last param to DrawString
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With