我想繪製一個字符串作爲軸標籤。當我用以下代碼繪製字符串時,我可以從「左側」讀取它。文本的底線在左側。如何控制Drawstring的方向?
StringFormat format = CustomGraphics.StringFormat(ContentAlignment.MiddleCenter);
format.FormatFlags |= StringFormatFlags.DirectionVertical;
e.Graphics.DrawString(this.yAxis.Title.Text, this.yAxis.Title.Font,
textBrush, e.Bounds, format);
format.FormatFlags &= ~StringFormatFlags.DirectionVertical;
我想繪製垂直,但將方向轉180度。我怎樣才能控制這個?我應該使用另一種方法嗎?
感謝您的鏈接到最初的樣本基礎。這讓我瞭解了其他方法,Hans提到。 – harper 2011-03-21 18:42:20