System.Windows.Forms.Control.CreateGraphics C# (CSharp) Method

CreateGraphics() public method

public CreateGraphics ( ) : Graphics
return System.Drawing.Graphics
		public Graphics CreateGraphics ()
		{
			var graphics = Graphics.FromHwnd (NSViewForControl.Handle);
			
			//graphics.TranslateTransform(Frame.Width / 2,Frame.Height / 2 );
			//graphics.Transform = new System.Drawing.Drawing2D.Matrix(1,0,0,-1,0,0);
			return graphics;
		}

Usage Example

Example #1
1
 public VisibleSurface(Control surface)
     : base(surface.Width, surface.Height)
 {
     base.DC = surface.CreateGraphics();
     base.Buffer = new Backbuffer(this);
     this.RedrawDirtyRectangleOnly = true;
 }
All Usage Examples Of System.Windows.Forms.Control::CreateGraphics
Control