Dear friends,
I can rotate the gradient from start with:
for i := 0 to 255 do
begin
Flame.Gradient[i][0] := Flame.Gradient[(i + 1) mod 256][0];
Flame.Gradient[i][1] := Flame.Gradient[(i + 1) mod 256][1];
Flame.Gradient[i][2] := Flame.Gradient[(i + 1) mod 256][2];
end;
end
but please how I can start the gradient rotation from the actual gradient position?
thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Dont understand much, but if there is a variable for the current gradient position you can write
for i := 0 to 255 do
begin
Flame.Gradient[(i + v) mod 256][0] := Flame.Gradient[((i + v + 1) mod 256][0];
Flame.Gradient[(i + v) mod 256][1] := Flame.Gradient[(i + v + 1) mod 256][1];
Flame.Gradient[(i + v) mod 256][2] := Flame.Gradient[(i + v + 1) mod 256][2];
end;
end
where v is the gradient position. Sorry if I misunderstand your question.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Dear friends,
I can rotate the gradient from start with:
for i := 0 to 255 do
begin
Flame.Gradient[i][0] := Flame.Gradient[(i + 1) mod 256][0];
Flame.Gradient[i][1] := Flame.Gradient[(i + 1) mod 256][1];
Flame.Gradient[i][2] := Flame.Gradient[(i + 1) mod 256][2];
end;
end
but please how I can start the gradient rotation from the actual gradient position?
thanks
Dont understand much, but if there is a variable for the current gradient position you can write
for i := 0 to 255 do
begin
Flame.Gradient[(i + v) mod 256][0] := Flame.Gradient[((i + v + 1) mod 256][0];
Flame.Gradient[(i + v) mod 256][1] := Flame.Gradient[(i + v + 1) mod 256][1];
Flame.Gradient[(i + v) mod 256][2] := Flame.Gradient[(i + v + 1) mod 256][2];
end;
end
where v is the gradient position. Sorry if I misunderstand your question.