asp.net picture combination generation control of imitation windows word-making program

Source: Internet
Author: User

A recent project has done an interesting control, take out the root share, ^_^. In the field of mechanical design often involves special symbols, such as a part of the inspection items are: verticality, parallelism and so on. Most of the inspection items for each part consist of a special symbol representing the test item and an error range, such as

,

I don't know many symbols (I'm sorry, I didn't learn mechanical design) ... It is not included in the Windows default font, and it is obviously not realistic to install a special font library for each client. And the most recent projects are often to deal with these special symbols, many places need to present these things, so naturally thought of using pictures to show. But new problems arise, these symbols are not fixed, such as the same test item (that is, special symbols) in different parts of the acceptable error range is not the same, which requires the system administrator based on the actual parts to configure the build. So I made a control that can be combined to build a picture.

The mode of operation is as follows:

1. Position the blue area of a rectangle by dragging the grid canvas of the selected size (if a canvas of another size is required, add an option with the content "digital X" under the Select element in "Imgfactory.ascx").

2. In the middle click to select a type of elements (divided into: text, borders, special symbols 3 kinds.) If you choose text, you need to enter text in the text box below. If a new special symbol needs to be added, add a 32*32 gif symbol picture in the specified folder configured in Web.config, note: The special symbol picture must be named after the integer within 255.

3. Click on the preview in the right preview area, or click Undo to undo the last step of the action

4. When you are satisfied with the preview picture, click "Save Picture" to make the picture a file and save it in the specified directory of the server and return the filename.

The following provides the source code, is currently the user control, has not been packaged as a custom control, of course, there are some small bugs, such as the text can not have the ' @ ' symbol (because I used to as a separator, hehe), interested friends download to see it.

Imgfactory

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.