On the weekend i wanted to perform the task of drawing a yellow rectangle programmatically onto the screen of a Personal Computer:
- The program would feature a viewport that occupies the entirety of the primary display of the PC.
- On the viewport, 640 pixels could be adressed in width, 480 in height.
- The viewport would be drawn in black color by default.
- A yellow, filled rectangle would be drawn from an upper left corner at pixel coordinates 10 from the left, 20 from the top to a lower right corner at 100 from the left, 75 from the top.
- When having drawn the yellow rectangle, the program would indefinately await any keypress and then shut down.
I solved this task using several different programming languages and toolkits, having the following goals for the implementation:
- The program does a simple thing, so it should require little processing and memory resources.
- The program should still work in 24 months from now.