DarkWorlds
Technical User
Well this was something out of the book, but has been modified to do a few more things i need it to do. Right now im just trying to get the delete feature working. Its supposed to delete the closest to the mouse click, but instead what its doing is deleteing the first one in the array list. I know im doing something wrong. But no errors :/
heres where I think is going wrong in my code
else if (rbtn_Delete.Checked)
{
Point[] pointArray = (Point[])points.ToArray(points[0].GetType());
for (int i = 0; i<pointArray.Length; i++)
{
currentTaxicab = Math.Abs(e.X - pointArray.X) + Math.Abs(e.Y - pointArray.Y);
if (currentTaxicab <= oldTaxicab)
{
currentPoint = temp;
oldTaxicab = currentTaxicab;
}
}
points.RemoveAt(currentPoint);
}
drawPanel.Invalidate();
you can download the full source here:
Gotta thank a friend for letting me use his space
Im totaly lost. on this part... also if anyone has any cluse how to do a PolyBezier. Supposedly its DrawBeziers method passing it the pen reference and the array of points reference. A PolyBezier curve can only be drawn with 4 or 4 plus a multiple of 3 points.
But again this loses me.
heres where I think is going wrong in my code
else if (rbtn_Delete.Checked)
{
Point[] pointArray = (Point[])points.ToArray(points[0].GetType());
for (int i = 0; i<pointArray.Length; i++)
{
currentTaxicab = Math.Abs(e.X - pointArray.X) + Math.Abs(e.Y - pointArray.Y);
if (currentTaxicab <= oldTaxicab)
{
currentPoint = temp;
oldTaxicab = currentTaxicab;
}
}
points.RemoveAt(currentPoint);
}
drawPanel.Invalidate();
you can download the full source here:
Gotta thank a friend for letting me use his space
Im totaly lost. on this part... also if anyone has any cluse how to do a PolyBezier. Supposedly its DrawBeziers method passing it the pen reference and the array of points reference. A PolyBezier curve can only be drawn with 4 or 4 plus a multiple of 3 points.
But again this loses me.