procedure RotatePoints(var Points: array of TPoint;//顶点
const Angle: Extended;//角度
const Org: TPoint);//原点
var
Sin, Cos: Extended;
Prime: TPoint;
I: Integer;
begin
SinCos(Angle, Sin, Cos);
for I := Low(Points) to High(Points) do
with Points do
begin
Prime.X := X - Org.X;
Prime.Y := Y - Org.Y;
X := Round(Prime.X * Cos - Prime.Y * Sin) + Org.X;
Y := Round(Prime.X * Sin + Prime.Y * Cos) + Org.Y;
end;
end;
我的初中几何也不好!