by Johan » May 29, 2009 @ 9:32pm
Hello,
The easiest way to draw lines with variable width is as follows:
1. Implement a simple <a href="http://en.wikipedia.org/wiki/Bresenham's_line_algorithm">Bresenham</a> line algorithm in your code
2. For each coordinate, draw a circle bitmap using BltFast. Use variable circle widths for different line thickness.
This is what my students used when implementing paint programs a few years ago using GapiDraw and it worked very well. Implementing a Bresenham routine using copy/paste and calling BltFast can probably be done in less than an hour if you copy some code on the Internet.
Sincerely
Johan