コード例 #1
0
ファイル: Canvas.cs プロジェクト: xamarin-forks/Praeclarum
 public override void DrawRect(CGRect dirtyRect)
 {
     try {
         var c = NSGraphicsContext.CurrentContext.GraphicsPort;
         var g = new CoreGraphicsGraphics(c, true);
         var e = new CanvasDrawingEventArgs(g, Bounds.ToRectangleF());
         Drawing(this, e);
     } catch (Exception ex) {
         Log.Error(ex);
     }
 }
コード例 #2
0
        public override void DrawRect(System.Drawing.RectangleF dirtyRect)
        {
            base.DrawRect(dirtyRect);

            var g = new CoreGraphicsGraphics(NSGraphicsContext.CurrentContext.GraphicsPort, true);

            var bounds = Bounds;

            _clock.Width  = bounds.Width;
            _clock.Height = bounds.Height;

            _clock.Draw(g);
        }
コード例 #3
0
            public override void Draw(System.Drawing.RectangleF rect)
            {
                base.Draw(rect);

                var c = UIGraphics.GetCurrentContext();
                var g = new CoreGraphicsGraphics(c, true);

                var bounds = Bounds;

                _clock.Width  = bounds.Width;
                _clock.Height = bounds.Height;
                _clock.Draw(g);
            }