I have declare array as below:
dim type (x, y) shape(1000, 500)
first dimension is points in a polygon shape, e.g. shape(0, 1) to shape(1000,1) , that I use to draw polygon. shape(0, 2) to shape(1000,2) refers to another polygon.
when draw polygon, I use the code below:
for jj = 0 to cntshape - 1
for ii = 0 to cntpt(jj) - 1
ptstmp(ii).x = shape(ii, jj).x
ptstmp(ii).y = shape(ii, jj).y
next
form1.polygon(ptstmp(), 0, cntpt(jj) - 1, cBlack, F)
next
I found that in PPC, the above for ii loop takes time (i.e. slow as one second when draw over 10 shapes).
If I can refer to one of the dimension I should be able to avoid the for ii loop.
e.g.
form1.polygon(shape(,jj), 0, cntpt(jj) -1 , cBlack, F)
Or any other way to do so?
dim type (x, y) shape(1000, 500)
first dimension is points in a polygon shape, e.g. shape(0, 1) to shape(1000,1) , that I use to draw polygon. shape(0, 2) to shape(1000,2) refers to another polygon.
when draw polygon, I use the code below:
for jj = 0 to cntshape - 1
for ii = 0 to cntpt(jj) - 1
ptstmp(ii).x = shape(ii, jj).x
ptstmp(ii).y = shape(ii, jj).y
next
form1.polygon(ptstmp(), 0, cntpt(jj) - 1, cBlack, F)
next
I found that in PPC, the above for ii loop takes time (i.e. slow as one second when draw over 10 shapes).
If I can refer to one of the dimension I should be able to avoid the for ii loop.
e.g.
form1.polygon(shape(,jj), 0, cntpt(jj) -1 , cBlack, F)
Or any other way to do so?