Draw a rotating line on a canvas
Posted on 2009-02-09
This is a hard one.
I am drawing the TCanva of a form using "Pixels [x, y] := MyColor;"
- Drawing area is 400x400 pixel starting at position 0,0.
- Draw a line from the center of the area (pos:200,200).
- Line length is half of area size 200 pixels (so it will never touch the corners...)
- Line width is always 1 pixel
Where it gets hard:
- The line color is diferent for each pixel
- The drawing area can change size
- I want to draw the line using radians
- I want to draw the line from center outward (so if the line is 200 pixels, pixel #1 is on center and #200 is at the end of the line)
Radians, pixel number, and color values come from a database. but for the purpouse of this project lets just assign a random value.
Hope you guys can help..