SetViewportOrgEx-Windows API

Source: Internet
Author: User

Setviewportorgex indicates the device point mapped to the window origin (0, 0)
Bool setviewportorgex (
HDC, // handle of the device content
Int X, // X coordinate of the new viewport
Int y, // y coordinate of the new viewport
Lppoint // coordinates of the original viewport
);
Parameters:
HDC: [input] Handle of device content
X: [input] x coordinate of the device unit of the new viewport Origin
Y: [input] Y coordinate of the device unit of the new viewport Origin
Lppoint:
[Output] points to a point structure to receive the coordinates of the original viewport origin. The coordinates are device units. If lppoint is null, this parameter is not used.
Return Value:
If the return result is successful, a value other than 0 is returned. If the return result fails, 0 is returned.
Note:
This function (along with setviewportextex and setw.wextex) helps define the logical coordinate space (that is, a window) to the device coordinate space ing (viewport ). Setviewportorgex specifies the device point mapped to the logical point (0, 0). It has the function of moving the coordinate axis, so that the logical point (0, 0) no longer points to the upper left corner.
// Map the logical point (0, 0) to the device point (xvieworg, yvieworg)
Setviewportorgex (HDC, xvieworg, yvieworg, null)
This is the role of setviewportorgex. In general, you use one function or another function, but you cannot use it all. Whether you use setjavasworgex or setviewportorgex, the device point () is always in the upper left corner.

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.