I used the inbuilt DirectX Line class, which has a draw method that takes an array of points that make up a line, and draws rectangles between them.
I also drew a circle at each point on the line, so that the line was smoother (as the rectangles sometimes had gaps between them.
The following image shows the line tool at work. It was drawn using the Wiimote.

The width of the line tool can be varied by clicking the + and - buttons on the Wiimote.
I have also optimised the painting of shapes, and now only the most recent shape is redrawn on the canvas (this reduces the load on the processor considerably, especially when the image is large).
No comments:
Post a Comment