quick question on polygon method

andreww
03-14-2002, 06:20 AM
is my program say i have 13 positions(x,y) pt(0-9).x/y......PtNo=13

to draw them i type in
Polygon me.hdc, Pt(0), PtNo
but what happens is that when its closing the shape up it will
draw a line from Pt(0) to Pt(12)..shown in fig B instead of Pt(0) to Pt(13)... shown in fig A

Flyguy
03-14-2002, 06:25 AM
You say you have 13 positions, but when starting on 0 then 12 will be the last, so you need 14 positions to store point 13 too!

andreww
03-14-2002, 06:31 AM
sorry i see where i typed an error in
i mean from 0 to 12
which is 13 points ie 0,1,2,3,4,5,6,7,8,9,10,11,12

so its draws from pt(0) to pt(11) pt(0) to pt(12)

sorry is what you you said still valid with this update?
i sorta dont get it

Flyguy
03-14-2002, 06:33 AM
Yes, you also have to connect to point 13 ...


0 -> 1 -> 2 -> 3 -> 4 -> 5 -> 6
^ |
| V
13<- 12<- 11<- 10<- 9 <- 8 <- 7

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum