C # Graphic Programming

Source: Internet
Author: User
  • C # image movement and Rotation

    Abstract: 1. Rotate E. graphics. rotatetransform (30366f, matrixorder. prepend); 2. Pan E. graphics. translatetransform (100366f, 0.0f); 3. Scale E. graphics. scaletransform (3.0f, 1.0f, matrixorder. append); 4. Coordinate Transformation E. graphics. translatetr... read the full text posted @ Addo read (1319) | comment (0) Edit
  • C # Set the display area of the drawing area setclip Abstract: graphics. isvisible (points, areas): these points, whether the area is visible within the drawing board. Main Code for setting the display area: graphics. setclip (range, display mode) graphics. intersetclip (range used for intersection); // sets the new range to the intersection of the old range and the input range. Graphics. resetclip (); // reset the [Code] range to: 1. Specify the region graphics1.setclip (New recta... read the full text posted @ Addo read (970) | comment (0) Edit
  • C # screenshot Summary: Draw the current screen E. graphics. copyfromscreen (new point (140,140) screenshot start point, new point (100,100) painting start point, new size () screenshot size, copypixeloperation. mergecopy display mode); special parameter: current window location: This. location full screen size: screen. getworkingarea (this ). size... read the full text posted @ Addo read (509) | comment (0) Edit
  • C # reference coordinate system functions similar to modeling Abstract: In entity modeling software, various reference coordinate systems are often set and saved to facilitate model creation. C # similar functions are also available in plotting. But not as powerful as modeling software. In entity modeling software, various coordinate systems can be set and stored independently and called at any time. However, it can only be called in the form of nesting. When it is returned to the upper-level status, the skipped status will not be saved. 1 main command in Normal Mode: State = graphics. begincontainer (); Create a New Drawing status E. graphics. endcon... read the full text posted @ Addo read (883) | comment (0) Edit
  • C # drawing -- specify the End Shape of the line Abstract: 1 use the predefined shape brush attributes pen. startcap and pen. endcap to specify the shape of both ends of the line. Predefined shape: linecap. round, linecap. arrowanchor, for example, Pen. startcap = linecap. round; 2 use a custom shape. If you use a custom end shape, use pen. customstartcap and pen. customendcap attributes customlineca... read the full text posted @ Addo read (536) | comment (1) Edit
  • C # drawing basic graphics unit command Summary: 1 Define the drawing board graphics G = paintevnt. graphics; // graphics G = This. creategraphics (); // or generate directly. This can be form1, pictureboxgraphicsg = graphics. fromhwnd (hwnd); // generated from the window handle. Where: intptr hwnd = This. Handle; graphics... read the full text posted @ A read (675) | comment (0) Edit
  • C # image operations 1 Summary: 1 main command for displaying images: image. fromfile (); graphics. drawimage (image); [Code] 2. Main Command for image thumbnails: image. getthumbnailimage (); [Code] 3 main command for creating an image file: Metafile ("FILENAME", HDC ). Intptr HDC = graphics. gethdc (); graphics2 = graphics. fromimage (... read the full text posted @ a duo read (1099) | comment (0) Edit
  • C # drawing (1) Abstract: protected override void onpaint (painteventargs paintevnt) {// obtain the drawing board graphics GFX = paintevnt. graphics; // construct the pen mypen = new pen (color. black); // draw line for (INT I = 20; I <250; I = I + 10) {GFX. dr... read the full text posted @ Addo read (2842) | comment (1) Edit

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.