Image ground points, image coordinates, and device coordinates in VC

Source: Internet
Author: User

There are many coordinate systems in Vc, and sometimes it is difficult to clearly distinguish between them. In general, there are logical coordinates and device coordinates, and there are intersections between coordinates.

Logical coordinates are the coordinates used by the system as records. They are widely used. As long as the original data has such logical coordinates, they are the criteria and basis for us to convert the coordinates of devices. When the client area does not have the scroll function, the device coordinates are consistent with the logical coordinates.

Device coordinate, also known as physical coordinate, is the coordinate on the output device. Device coordinates on the screen are usually called screen coordinates. The device coordinate specifies the object position based on the horizontal distance and vertical distance between the object and the upper left corner of the window, expressed in pixels. the X axis of the device coordinate is positive to the right, and the Y axis is positive downward, the coordinate origin is located in the upper left corner of the window.

The customer zone coordinates are relative to the device coordinates for the so-called desktop. There are several mode conversion problems.

1. ing mode: the conversion between pixel coordinates of an image to a ground point and the selection of the ing mode of device coordinates

2. Conversion of logical coordinates and device coordinates: You can use the CDC function dptolp () to convert device coordinates into logical coordinates, or use lptodp () to convert logical coordinates into device coordinates.

3. screen coordinates and client region coordinate coordinates: screentoclient and clienttoscreen

4. coordinate origin definition: Sometimes, for visual convenience, the coordinate origin is usually set to a place outside the upper left corner. Even the image coordinates are not necessarily defined in the upper left corner:: setviewportorg () function

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.