Inheritance: System.EventArgs
Exemplo n.º 1
0
		public override void DrawRect (System.Drawing.RectangleF 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);
			}
		}
Exemplo n.º 2
0
 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);
     }
 }
Exemplo n.º 3
0
        public override void Draw(CoreGraphics.CGRect rect)
        {
            try {
                base.Draw(rect);

                var c = UIGraphics.GetCurrentContext();

                var e = new CanvasDrawingEventArgs(
                    new CoreGraphicsGraphics(c, true),
                    Bounds.ToRectangleF()
                    );

                Drawing(this, e);
            } catch (Exception ex) {
                Log.Error(ex);
            }
        }
Exemplo n.º 4
0
        void HandleDrawing(object sender, CanvasDrawingEventArgs e)
        {
            var g = e.Graphics;

            if (visibleArea.Width <= 0 || visibleArea.Height <= 0)
            {
                return;
            }

            var scale = (float)canvas.Frame.Width / (float)visibleArea.Width;

            g.Scale(scale, scale);

            g.Translate(-visibleArea.X, -visibleArea.Y);

            var ne = new CanvasDrawingEventArgs(
                e.Graphics,
                visibleArea
                );

            Drawing(this, ne);
        }
Exemplo n.º 5
0
		void HandleDrawing (object sender, CanvasDrawingEventArgs e)
		{
			var g = e.Graphics;

			if (visibleArea.Width <= 0 || visibleArea.Height <= 0)
				return;

			var scale = (float)canvas.Frame.Width / (float)visibleArea.Width;

			g.Scale (scale, scale);

			g.Translate (-visibleArea.X, -visibleArea.Y);

			var ne = new CanvasDrawingEventArgs (
				e.Graphics,
				visibleArea
			);
			Drawing (this, ne);
		}
Exemplo n.º 6
0
		public override void Draw (CoreGraphics.CGRect rect)
		{
			try {
				base.Draw (rect);
				
				var c = UIGraphics.GetCurrentContext ();
				
				var e = new CanvasDrawingEventArgs (
					        new CoreGraphicsGraphics (c, true),
					        Bounds.ToRectangleF ()
				        );
				
				Drawing (this, e);
			} catch (Exception ex) {
				Log.Error (ex);
			}
		}