Exemple #1
0
 public void DrawText(string text, Rect frame, Font font, TextAlignment alignment = TextAlignment.Left, Pen pen = null, BaseBrush brush = null)
 {
     var layout = new DW.TextLayout(factories.DWFactory, text, GetTextFormat(font), (float)frame.Width, (float)frame.Height);
     var h      = layout.Metrics.Height;
     //todo : : Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
     //renderTarget.DrawTextLayout ((frame.TopLeft - h*Point.OneY.Y).ToVector2 (), layout, GetBrush (frame, brush));
 }
Exemple #2
0
 public void DrawText(string text, Rect frame, Font font, TextAlignment alignment = TextAlignment.Left, Pen pen = null, BaseBrush brush = null)
 {
     var layout = new DW.TextLayout (factories.DWFactory, text, GetTextFormat (font), (float)frame.Width, (float)frame.Height);
     var h = layout.Metrics.Height;
       //todo : : Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
       //renderTarget.DrawTextLayout ((frame.TopLeft - h*Point.OneY.Y).ToVector2 (), layout, GetBrush (frame, brush));
 }