Assuming that I'm using a pixmap, I've made a simple routine that goes through every pixel in the pixmap and draws pixels of a color which is basically the distance from the center. So the middle is white and then it is surrounded by concentric circles gradually fading out, and all pixels in the pixmap are filled. The radius can be different in X and Y (ie both have scaling) to allow ellipses.
I need to do the same thing but so that the end result is a rectangle (or square with separate x/y stretching). I cannot see how to do it. It must do the same pass through all the pixels and at each pixel should perform some calculation to render the pixel based on - in some way - the distance from the center, but not to produce circles. I do not want to draw lots of filled rectangles on top of each other, each pixel in the destination must be touched once only.
Whereas Sqr((XDiff*XDiff)+(YDiff*YDiff)) gives circles, what would give rectangles?
I need to do the same thing but so that the end result is a rectangle (or square with separate x/y stretching). I cannot see how to do it. It must do the same pass through all the pixels and at each pixel should perform some calculation to render the pixel based on - in some way - the distance from the center, but not to produce circles. I do not want to draw lots of filled rectangles on top of each other, each pixel in the destination must be touched once only.
Whereas Sqr((XDiff*XDiff)+(YDiff*YDiff)) gives circles, what would give rectangles?