|
-
Nov 7th, 2001, 10:18 AM
#1
Thread Starter
Junior Member
Drawing and Filling a Polygon
Excuse this apology for a programmer. I want to draw/fill a polygon. So have declared:
Public Declare Function CreatePolygonRgn Lib "gdi32" (lpPoint As POINTAPI, ByVal nCount As Long, ByVal nPolyFillMode As Long) As Long
Public Type POINTAPI
x As Long
y As Long
End Type
I assume that nCount asks for the number of vertices, nPolyFillMode is the type of fill and lppoint asks for the vertices.
I've started my code as:
Dim A As POINTAPI
Dim B As POINTAPI
Dim C As POINTAPI
Private Sub Form_Load()
Picture1.Scale (-200, -200)-(1200, 1200)
With Picture1
A.x = 0
A.y = 0
B.x = 0
B.y = 1000
C.x = 1000
C.y = 0
And now I want to call CreatePolygonRgn . I know that nCount = 3. I'll set nPolyFillMode as alternate.
But how do I input lpPoint? Using A - B - C or A,B,C is clearly no good. So do I have to set the points up as an array?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|