Z
zqm7323567
Unregistered / Unconfirmed
GUEST, unregistred user!
function TextToPolygon(const S: string): TFloatPolygon;
var
A, B: string;
P: PChar;
begin
Result := nil;
if S <> '' then
begin
P := PChar(S);
repeat
A := NextToken(P);
B := NextToken(P);
if (A <> '') and (B <> '') then
begin
SetLength(Result, Length(Result) + 1);
Result[Length(Result) - 1].X := StrToFloat(A);
Result[Length(Result) - 1].Y := StrToFloat(B);
end;
until (A = '') or (B = '');
if Length(Result) < 3 then
Result := nil;
end;
end;
var
A, B: string;
P: PChar;
begin
Result := nil;
if S <> '' then
begin
P := PChar(S);
repeat
A := NextToken(P);
B := NextToken(P);
if (A <> '') and (B <> '') then
begin
SetLength(Result, Length(Result) + 1);
Result[Length(Result) - 1].X := StrToFloat(A);
Result[Length(Result) - 1].Y := StrToFloat(B);
end;
until (A = '') or (B = '');
if Length(Result) < 3 then
Result := nil;
end;
end;