0
我想將一些自定義文本添加到我的圖表。 但是我在設置Monotouch中的字體時遇到困難。如何在使用MonoTouch和TeeChart的AfterDraw事件中的TextOut中設置字體
ChartFont fontLine1 = new ChartFont();
fontLine1.Brush.Color = Style.ColorStyle4;
fontLine1.DrawingFont = Style.ValueItemTitle.ToCTFont();
g.TextOut(fontLine1, currentX, currentY, AnnotationLabel);
Style.ColorStyle4是White(CGColor); .TOCTFont是將UIFont轉換爲CTFont的轉換路由。
但是,文本仍然很小(大小應該是18),並且字體名稱不正確。
如果我沒有設置ChartFont,我會得到完全相同的結果。
那麼,如何設置適當的字體在AfterDraw事件中寫入文本?