From: Ethan A M. <me...@uw...> - 2023-06-17 19:44:16
|
OK, it's pushed to the development branch for 6.1. I revised the top-level criterion for choosing the new method that uses term->image rather than the old method that uses term->fille_polygon. Commit message: Rather than selecting the colorbox-as-image code for all terminals that support term->image, make it dependent on a terminal flag. Instead of if (term->image) ... use if ((term->flags & TERM_COLORBOX_IMAGE)) The svg, domterm, and canvas terminals definitely do not want this flag. The pdfcairo terminal definitely does want it. For now the flag is set by these terminals epscairo cairolatex pdfcairo qt Other terminals can be added later by setting TERM_COLOR_BOX_IMAGE in the corresponding driver source. Possible candidates tikz wxt The PostScript-based terminals are not affected since colorbox generation code is done in the PostScript header code rather than in the core C code. Thanks for working on this. Ethan On Thursday, 15 June 2023 22:13:47 PDT Ethan A Merritt wrote: > On Thursday, 15 June 2023 15:39:22 PDT Dima Kogan wrote: > > > > dima@shorty:~/projects/gnuplot$ git show-branch HEAD origin/master > > ! [HEAD] smooth colorbox: render as a bitmap if the terminal supports it > > ! [origin/master] Do not report terminal type to user until after initialization is complete > > -- > > + [HEAD] smooth colorbox: render as a bitmap if the terminal supports it > > + [HEAD^] no-op cleanup: consolidated next-colorbox-slice logic > > + [HEAD~2] no-op cleanup: consolidated draw-colorbox-slice logic > > + [HEAD~3] no-op cleanup: consolidated colorbox bounds logic > > + [HEAD~4] no-op cleanup: consolidated steps-in-colorbox logic > > + [origin/master] Do not report terminal type to user until after initialization is complete > > + [origin/master^] VMS cleanup > > ++ [HEAD~5] qt: qt4 was apparently weak at int->double promotion > > > > I'm attaching the patches to this email. > > I like it so far. > I will try to think of more tests to run. > > > > OK. The other alternative is to make this specific to cairopdf. Unless > > > you know of other terminals that suffer from the same problem? > > [snip descroption of svg problems with small number of image pixels] > > So if we > > can fix this, I'd say we should do the colorbox-image thing whenever > > available. But if we can't, maybe limiting it to only cairopdf (or NOT > > svg) is the answer. > > > > Let me ask a web-dev friend about how to make svg work right in all > > browsers. There's probably a way. > > > > The current set of attached patches does NOT limit itself to cairopdf > > I think it benefits all the cairo terminals, or at least doesn't hurt. > Beyond that, well - that's what I am trying to test. > I will add a FIXME comment. > > > Ah yes. This is exactly what I mentioned above. I don't remember any > > terminal other than svg having this problem. But I certainly haven't > > touched all of them. > > The HTML5 canvas terminal has the same problem: browsers apply > inter-pixel interpolation, details of which are poorly documented. > > cheers > Ethan > > > -- Ethan A Merritt Biomolecular Structure Center, K-428 Health Sciences Bldg MS 357742, University of Washington, Seattle 98195-7742 |