Menu

Flame.Gradient

Luke
2007-10-04
2013-04-25
  • Luke

    Luke - 2007-10-04

    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

     
    • Leonardo Pereira

      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.

       

Log in to post a comment.