trying to use PointF in a loop?

G

Guest

PointF is used as part of the fillpolygon method.
The code below is looping through the array count and then creating a new
point based on 2 array list values. One array has the x data points and the
other has the y data points. The problem is I need to change the point name
in the last line for each time through the loop so it does not just write
over the existing one. Tried using a variable string but it did not work,
any ideas? PointF takes 2 float arguments hence the data conversions.

for (int i_count = 0; i_count <= i_xcount;i_count++)
{
d_1 = Convert.ToDouble (Arx[i_count]);
float x1 = (float) d_1;
d_2 = Convert.ToDouble (Ary[i_count]);
float y1 =(float) d_2;
PointF point = new PointF (x1,y1);//this is the line that needs a
variablename
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top