[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] Gradient Algorithm
Could you modify it so that it can handle horizontal or diagonal gradients as well? Horizontal is easy, I'm not sure about diagonals though. I guess you would have to increment y and x by their own separate speed for each iteration and then draw a line from 0,y to x,0. But that only works for top-left to bottom-right diagonals. I guess it needs a special case for all 4 diagonals, and horizontal, and vertical :)