Three Dimensional Bars! Well, I guess to be more accurate they would be called isometric?
I had been thinking about doing this for a while and it seemed like an obvious idea :)
Anyway, I thought this project would be easy, and to begin with it was. Getting a bar on Lua is pretty easy, then all I would have to do is draw a top and a side and get everything moving correctly. This all happened quickly until I started to look at the lines!
Unfortunately I couldn't simply take the shapes I had drawn to form the "faces" with fill, and overlay them using stroke. The corners stuck out when the line width was increased and the different line unison options in cairo were not going to work. So I had to re-do the lines from scratch, and it took far too may attempts and corrections before I finally got it right.
With this script you can specify:
- face color
- line color
- bar width ("depth" is always set to width/2)
- bar height
- bar position
- wire-frame outline on or off
- and font, font size, font color and font position