Winapi: polypolygon-draw a group of polygon

Source: Internet
Author: User
// Declaration: polypolygon (DC: HDC; {Device environment handle} var points; {point array} var npoints; {array, the array element is the number of vertices of each polygon} P4: INTEGER {Number of polygon, that is, the number of npoints elements}): bool;

 // Example: Procedure tform1.formpaint (Sender: tobject); var PS: array [0 .. 9] of tpoint; PN: array [0 .. 1] of integer; begin {polygon 1:} PS [0]. x: = 50; PS [0]. y: = 50; PS [1]. x: = 100; PS [1]. y: = 50; PS [2]. x: = 125; PS [2]. y: = 75; PS [3]. x: = 100; PS [3]. y: = 100; PS [4]. x: = 50; PS [4]. y: = 100; PS [5]. x: = 25; PS [5]. y: = 75; {polygon 2:} PS [6]. x: = 200; PS [6]. y: = 25; PS [7]. x: = 300; PS [7]. y: = 25; PS [8]. x: = 300; PS [8]. y: = 125; PS [9]. x: = 200; PS [9]. y: = 125; PN [0]: = 6; {polygon 1 has 6 vertices} PN [1]: = 4; {polygon 2 has 4 vertices} polypolypolygon (canvas. handle, PS, Pn, 2); end;

 //:


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.