almost
2011-04-14 15:08:27
I need to make an array that is exactly like TCanvas.Pixels
Pixels has an x and a y value (an array of an array of integer I suppose?) that give you a final value, the color of the pixel at (x, y).
I can do something like this-
But it is different because you have to use it like Points[x][y]:= a;
But Pixels is used like Pixels[x, y]:= a;
Is there a way to make it like Pixels?
My main issue is setting the array lengths.
I have to do
I need a way to basically set the first array size, then have every array of that array to be the same size.
Pixels has an x and a y value (an array of an array of integer I suppose?) that give you a final value, the color of the pixel at (x, y).
I can do something like this-
var
Points: array of array of integer;But it is different because you have to use it like Points[x][y]:= a;
But Pixels is used like Pixels[x, y]:= a;
Is there a way to make it like Pixels?
My main issue is setting the array lengths.
I have to do
SetArrayLength(Points, 100);
for i:= 0 to High(Points) do
SetArrayLength(Points[i], 100);This is very inefficient when using large arrays and having to continuously set their sizes.I need a way to basically set the first array size, then have every array of that array to be the same size.