public void DrawText(string text, Rect frame, Font font, TextAlignment alignment = TextAlignment.Left, Pen pen = null, Brush brush = null) { var layout = new DW.TextLayout(factories.DWFactory, text, WinRTPlatform.GetTextFormat(factories, font), (float)frame.Width, (float)frame.Height); var h = layout.Metrics.Height + layout.OverhangMetrics.Top; renderTarget.DrawTextLayout((frame.TopLeft - h * Point.OneY).ToVector2(), layout, GetBrush(frame, brush)); }
public TextMetrics MeasureText(string text, Font font) { return(WinRTPlatform.GlobalMeasureText(factories, text, font)); }