Exemplo n.º 1
0
 /// <summary>
 /// Draws the content of the view.
 /// </summary>
 /// <param name="dirtyRect">The rectangle to draw.</param>
 public override void DrawRect(CoreGraphics.CGRect dirtyRect)
 {
     if (this.model != null)
     {
         var context = NSGraphicsContext.CurrentContext.GraphicsPort;
         context.TranslateCTM(0f, dirtyRect.Height);
         context.ScaleCTM(1f, -1f);
         // TODO: scale font matrix??
         using (var renderer = new CoreGraphicsRenderContext(context))
         {
             ((IPlotModel)this.model).Render(renderer, dirtyRect.Width, dirtyRect.Height);
         }
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Draws the content of the view.
 /// </summary>
 /// <param name="dirtyRect">The rectangle to draw.</param>
 public override void DrawRect(CoreGraphics.CGRect dirtyRect)
 {
     if (this.model != null)
     {
         var context = NSGraphicsContext.CurrentContext.GraphicsPort;
         context.TranslateCTM(0f, dirtyRect.Height);
         context.ScaleCTM(1f, -1f);
         // TODO: scale font matrix??
         using (var renderer = new CoreGraphicsRenderContext(context))
         {
                 ((IPlotModel)this.model).Render(renderer, dirtyRect.Width, dirtyRect.Height);
             }
     }
 }