I currently have this, and it sucks:
type TpointArray = array [0..3] of Tpoint;
class function rotationTable.offsets(pType, rotState, dir: integer): TpointA
Arrays of records can be intialised in const expressions:
const
Points : TPointArray = ((X: 1; Y: 1), (X:1; Y:2), (X:1; Y:1), (X:1; Y:1));
class function rotationTable.offsets(pType, rotState, dir: integer): TpointArray;
begin
Result := Points;
end;
In XE7 it is possible to fill a dynamic array of records like this:
function GetPointArray: TArray;
begin
Result := [Point(1,1),Point(1,2),Point(1,1),Point(1,1)];
end;