delphi画图中出现多变形 画不出来polygon 感觉程序都没有错误呀
AssignFile(F,'e:\地图数据/绿地.MIF');Reset(F); //只读打开
Readln(F,penwidth,pentype,pencolor);
Readln(F,siBrushPattern,lForeColor,lBackColor);
R:=round(pencolor/65536);
G:=round((pencolor-R*65536)/256);
B:=pencolor-R*65536-G*256;
R1:=round(lForeColor/65536);
G1:=round((lForeColor-R1*65536)/256);
B1:=lForeColor-R1*65536-G1*256;
while not Eof(F) do
begin
readln(F);
readln(F,points);
readln(F,xArray[0],yArray[0]);
x:=round((xArray[0]-mapleftx)*1000000*setcshx);
y:=round((yArray[0]-maprighty)*1000000*setcshy);
image1.Canvas.MoveTo(x,y);
{ readln(F,xArray[0],yArray[0]);
x:=round((xArray[0]-mapleftx)*1000000*setcshx);
y:=round((yArray[0]-maprighty)*1000000*setcshy);
xArray[0]:=116.88365;
yArray[0]:=36.64903;
x:=round((xArray[0]-mapleftx)*1000000*setcshx);
y:=round((yArray[0]-maprighty)*1000000*setcshy);
image1.Canvas.Ellipse((x-100),(y-100),(x+100),(y+100));
}
for i:=1 to points-1 do
begin
readln(F,xArray[i],yArray[i]);
x:=round((xArray[i]-mapleftx)*1000000*setcshx);
y:=round((yArray[i]-maprighty)*1000000*setcshy);
pointone[i].X:=x;
pointone[i].Y:=y;
// MyPoints[0]:=Point(200,100);
// image1.Canvas.LineTo(x,y);
end;
// pointone[0]:=pointone[points-1];
image1.Canvas.Pen.Color:=RGB(R,G,B);
image1.Canvas.Pen.Width:=penwidth;
image1.Canvas.Brush.Color:= RGB(R1,G1,B1);
image1.Canvas.Polygon(pointone);
readln(F);
readln(F);
readln(F);
{ for i:=0 to points-1 do
begin
// pointone[i]:=point(x,y);
pointone[i].X:=0;
pointone[i].Y:=0;
end; }
end;
CloseFile(F);