谁有空帮忙下
// 利用直线的两点式方程://(y-y0)/(x-x0) = (y1-y0)/(x1-x0)
//具体到这个问题,就是(y-b)/(x-a) = (d-b)/(c-a),即:y=(d-b)/(c-a)*(x-a)+b
//新的2点。。。(y-news.y)(i-news.x)=(change.y-news.y)(change.x-news.x);
//y-=(change.y-news.y)*(change.x-news.x)/(i-news.x)+news.y
public static ArrayList xxx2点直线所以点(Point news,Point change)
{
ArrayList a = new ArrayList();
for (int i = change.X + 1; i < news.X; i++)
{
double k = ((double)(change.X - news.X) / (i - news.X));
int y =(int)((change.Y - news.Y) * k + news.Y);
a.Add(new Point(i,y));
}
return a;
}
帮忙看看哪里写错了改正下