In Windows, the GDI function pie

Source: Internet
Author: User

Msdn explanation:

Pie

ThePieFunction draws a pie-shaped wedge bounded by the intersection of an ellipse and two radials. The pie is outlined by using the current pen and filled by using the current brush.

BOOL Pie(  HDC hdc,         // handle to DC  int nLeftRect,   // x-coord of upper-left corner of rectangle  int nTopRect,    // y-coord of upper-left corner of rectangle  int nRightRect,  // x-coord of lower-right corner of rectangle  int nBottomRect, // y-coord of lower-right corner of rectangle  int nXRadial1,   // x-coord of first radial's endpoint  int nYRadial1,   // y-coord of first radial's endpoint  int nXRadial2,   // x-coord of second radial's endpoint  int nYRadial2    // y-coord of second radial's endpoint);
I didn't understand it for a long time. I used pie to draw two figures to figure out the true meaning of the parameters:
Nleftrect, ntoprect, nrightrect, and nbottomrect determine a rectangle, and the fan-shaped center (center of the circle) is the center of the rectangle, which is recorded as O.
Nxradial1, nyradial1 identifies a vertex and records it as a. There is an OA Ray
Nxradial and nyradial determine a point. If it is recorded as B, ob rays exist.
In this way, there is a fan-shaped OA string and a fan-shaped OAB with OB as the final string.

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.