C # Graphics Programming

  • c # pattern movement and rotation
    Abstract: 1, rotating e.Graphics.RotateTransform (30.0F, MatrixOrder.Prepend); 2 , translating e.Graphics.TranslateTransform (100.0F, 0.0F); 3 , scaling e.Graphics.ScaleTransform (3.0F, 1.0F, MatrixOrder.Append); 4, point coordinate transformation e.Graphics.TranslateTr ... read more
    @. Posted  2009-05-18 14:49  A duo Reading (1319) |  Comments (0)   Edit
  • SetClip C # display region provided the plot area
    Abstract: graphics.Isvisible (dot region): whether the visible range of points, in the region of the drawing board. Main display area disposed Code: graphics.SetClip (range, display mode) graphics.IntersetClip (for intersecting range); // set the old range and the new range to the intersection of this input range. graphics.ResetClip (); // Reset [Code] may range from: 1, the designated area graphics1.SetClip (new Recta ... Read
    @. Posted  2009-05-18 13:58  A duo Reading (970) |  Comments (0)   Edit
  • C # screenshot
    Abstract: Draw current screen e.Graphics.CopyFromScreen (new Point (10,10) starting screenshots, new Point (140, 140) to draw the starting point, new Size (100,100) taken size, CopyPixelOperation.MergeCopy display mode); special parameters: the current window position: this.Location full screen size: Screen.GetWorkingArea (this) .Size ... read more
    @. Posted  2009-05-18 13:06  A duo Reading (509) |  Comments (0)   Edit
  • C # drawing function similar to the reference coordinate system modeling
    Abstract: The solid modeling software, often save the settings and functions of the various reference coordinate system, easy to build the model. C # drawing has such similar features. But no less powerful modeling software. Solid modeling software can be independently set and save various coordinate systems, and at any time. And here only in the form of a nested call, when returning to the previous state, the state is no longer skipped saved. 1 Normal mode major commands: state = graphics.BeginContainer (); build a new drawing state e.Graphics.EndCon ... Read more
    @. Posted  2009-05-18 10:49  A duo Reading (883) |  Comments (0)   Edit
  • C # graphics rendering - Specifies the line shape of the end portion
    Abstract: 1 using a predefined shape at both ends of the brush shape and properties pen.StartCap pen.EndCap specified lines. Predefined shape: LineCap.Round, LineCap.ArrowAnchor the like such as: pen.StartCap = LineCap.Round; 2 using a custom shape if the shape of the end portion using a custom, and is used pen.CustomStartCap pen.CustomEndCap properties CustomLineCa. .. read more
    @. Posted  2009-05-15 17:01  A duo Reading (536) |  Comments (1)   Edit
  • C # basic graphics rendering unit Command Summary
    Summary: 1 Artboards defined Graphics g = paintEvnt.Graphics; // draw members Artboards event Graphics g = this.CreateGraphics (); // or directly generated. this may Form1, pictureBoxGraphicsg = Graphics.FromHwnd (hwnd) ; // generated from the window handle. Where: IntPtr hwnd = this.Handle; Graphics ... Read more
    @. Posted  2009-05-15 16:02  A duo Reading (675) |  Comments (0)   Edit
  • C # 1 image operation
    Summary: 1 picture display key commands: Image.FromFile (); graphics.DrawImage (image ); [ the code] 2 image thumbnails key commands: image.GetThumbnailImage (); [the code] 3 Create image files main command: Metafile ( " filename ", hdc). IntPtr hdc = graphics.GetHdc (); graphics2 = Graphics.FromImage (... Read more
    @. Posted  2009-05-15 12:57  A duo Reading (1099) |  Comments (0)   Edit
  • C # Paint (1)
    Abstract: protected override void OnPaint (PaintEventArgs paintEvnt ) {// Get Artboards Graphics gfx = paintEvnt.Graphics; // configured brush Pen myPen = new Pen (Color.Black) ; // draw a line for (int i = 20; i < 250; i = i + 10) {gfx.Dr ... read
    @. Posted  2009-05-15 12:53  A duo Reading (2842) |  Comments (1)   Edit

Reproduced in: https: //www.cnblogs.com/zhangchenliang/archive/2012/08/25/2657026.html

Guess you like

Origin blog.csdn.net/weixin_34355881/article/details/93495224