C # move of the drawing tool

Source: Internet
Author: User

Next, the small drawing tool in the previous article gradually improved its functions. The last time I talked about the operations on the file tree, mainly the creation and deletion of navigation files, this part is taken out separately because my colleague did not handle the part of the function in the project, so I implemented it myself. This time, I mainly draw elements and move them, of course, you can only draw simple components, such as straight lines and rectangles, and then select and move them. Of course, they will be gradually improved in the future, for example, rotating and drawing more responsible elements. Let's take a look at this part. It may not be very effective. Haha

It will be gradually improved in the future.

In fact, many people think that this part of the function is very easy to implement. Haha, it is really easy to implement. After processing the mousedown, mousemove, and mouseup events, you can draw components, with more detailed control, you can achieve amazing results. Haha, I personally think so. There is no profound knowledge or technology in it (I don't know if dual cache is counted, haha ).

In fact, this part of movement controls the coordinates in the mousemove event, and "real-time" changes the coordinate values of a straight line or a rectangle at a "four-point" to achieve movement. Haha. Since there is no knowledge, I won't be so embarrassed here. Haha ....

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.