I have spent a few wasted hours dabbling with this library and that library. I have drawn lines for myself, including anti-aliased lines, but not using very efficient code. I have looked at various algorithms but there are drawbacks in them all.
Feeling a bit gloomy about this and having tried and given up on all sorts of ideas I have kicked my heels for a couple of weeks, then I tripped over a message about libgd. I looked it up and it seems like my search for a graphics library is at an end.
I compiled the demo program which worked well so now I'm going to put my grea on hold and try using libgd in earnest. It has multi thickness lines, polygons, area fills font handling using freetype (including angled fonts), with anti-aliased It can save as png files. The one area that I have noticed seems to be missing is bezier curves - but i know to draw them so I could be onto a winner here.