help...create polygon region API 
Author Message
 help...create polygon region API

can anyone tell me how to set the 'array of point(vertex)' in the
'createpolygonrgn' api function? I just want to create a rhombus with
coordinate: (0,50),(50,0),(50,100),(100,50)
thanks!!



Tue, 19 Dec 2000 03:00:00 GMT  
 help...create polygon region API

http://www.matthart.com/
You'll find a good example
Check for 'region'

Benoit Lefebvre (mox)

Quote:

> can anyone tell me how to set the 'array of point(vertex)' in the
> 'createpolygonrgn' api function? I just want to create a rhombus with
> coordinate: (0,50),(50,0),(50,100),(100,50)
> thanks!!



Tue, 19 Dec 2000 03:00:00 GMT  
 help...create polygon region API

Quote:

>can anyone tell me how to set the 'array of point(vertex)' in the
>'createpolygonrgn' api function? I just want to create a rhombus with
>coordinate: (0,50),(50,0),(50,100),(100,50)

Declare a structure (UDT) of type POINTAPI:
        Type POINTAPI
                x as Long
                y as Long
        End Type

Dim an array of type POINTAPI and fill the array members with your values:

        Dim p(1 to 4) As POINTAPI
        p(1).x = 0
        p(1).y = 50
        p(2).x = 50
        p(2).y = 0
        etc...

In the call to CreatePolygonRgn, use the first array member, p(1), as the
argument:

        lRet = CreatePolygonRgn(p(1), 4, lFillMode)

Lee Weiner
weiner AT fuse DOT net



Tue, 19 Dec 2000 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Polygon regions

2. Drawing Polygon Filled Region in VB5

3. How can I create multiple regions with the ExtCreateRegion() API function

4. HELP: API Polygon Functions

5. Someone please help with Polygon API??

6. Please help with region create scale.

7. Help ! Creating a region from a picture mask

8. polygon - polygon intersection

9. #Region #End Region (code folding)?

10. picturebox.scale command with Polyline or Polygon API Call

11. Polygon API calls.....

12. Lines, Polygons and PolyBezier(?) with the API

 

 
Powered by phpBB® Forum Software