Coordinate systems in C # WinForm

Source: Internet
Author: User

Mathematically, point is a two-dimensional vector that contains two public integer attributes, with uppercase X and Y (the General Convention for Common Properties in C # begins with a capital letter). Use pointf instead of point when the coordinate is not an integer value of float.

The commonly used size and point structures are the same, with two integer attributes width and height, and variant SizeF, but they are used in a different way. A point is a description of where the entity is, and size is used to indicate how large the entities are, and the transformations can be displayed between them. A point and a size can form a rectangle. In addition, the point and size can be added and reduced: point-size=point;size+size=size; but Point+point (which is wrong) adds a little meaning to it.

The coordinate system in WinForm is divided into three main categories:

1. One is the screen coordinate system, the coordinates of the (0,0) point in the upper left corner of the display, the horizontal axis increases from left to right, and the ordinate is increased from top to bottom.

2. The second category is the form coordinate system, in order to WinForm the upper left corner of the form as (0,0) point, the horizontal axis increases from left to right, and the ordinate is increased from top to bottom.

3. The third class is the form control coordinate system, in which the upper-left corner of the control is (0,0), the horizontal axis is increased from left to right, and the ordinate is increased from top to bottom.

It also provides a method to convert these three kinds of coordinates, such as pointtoclient (), Pointtoscreen () and so on.

coordinate system "src=" http://s8.sinaimg.cn/bmiddle/5b101dbfx7228ca17d8c7&690 "action-type=" in the coordinate system "alt=" C # WinForm in WinForm Show-slide "Action-data=" http%3a%2f%2fs8.sinaimg.cn%2fbmiddle%2f5b101dbfx7228ca17d8c7%26690 "real_src="/HTTP/ s8.sinaimg.cn/bmiddle/5b101dbfx7228ca17d8c7&690 ">

Coordinate systems in C # WinForm

Related Article

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.