Hi @sfeam I have attached a patch to gd.trm that adds a short description. It also includes my e-mail address, but feel free to remove it or list it exclusively if this otherwise collides with the aesthetics of the comment block. As overall commit message, I would suggest the following, but feel free to adapt it to your preferred length. I have not included new lines in the paragraphs intentionally, so you can conveniently add them were you want them. gd terminal: antialiased thick lines, dash patterns,...
Update and patch: Looking at the graphs above it was clear that something was wrong with the disk/clipped-disk (depending on the endcaps) join rendering at positions with high curvature in the sinc curves (mainly at the bottom part of the valleys). This had nothing to do with the empty-canvas rendering patch I was testing but came down to a bug in the original patch where I used integer pixel coordinate instead of pixel centers in PNG_draw_join_disc. Also, there was another bug in PNG_draw_join_disc...
Update and patch: Looking at the graphs above it was clear that something was wrong with the disk/clipped-disk (depending on the endcaps) join rendering at positions with high curvature in the sinc curves (mainly at the bottom part of the valleys). This had nothing to do with the empty-canvas rendering patch I was testing but came down to a bug in the original patch where I used integer pixel coordinate instead of pixel centers in PNG_draw_join_disc. Also, there was another bug in PNG_draw_join_disc...
Hi @sfeam just wanted to tell you that I have a working solution for the transparency issue that uses the approach of rendering each line to a blank canvas that you have proposed. I will benchmark this again and check all the demo scripts for any regressions. If all goes well, I should be able to post a patch here soon. Attached is a test script for transparent lines and it's output.
My bad, I wasn't aware that one could even choose the alpha value for line colors in Gnuplot, but apparently, this was implemented quite some time ago. I will see if I can come up with a solution for that. Your suggestion of redering everything on a blank canvas sounds reasonable. As a side note: Didn't the old libgd terminal also have this issue, at least with thick lines where overlaps should have happened before when rendering the segments?
If you are interested, I can upload the output of the demo scripts for the terminals: png (with patch), png (original) and pngcairo, but it would be quite large.
PS: I can upload the output of the demo scripts as well, but that is 174 MB. Not sure if this is the right place.
Attachments here: