From: Ethan M. <merritt@u.washington.edu> - 2006-05-09 23:29:23
|
On Tuesday 09 May 2006 03:52 pm, you wrote: > I'm sending a sample .ps file with gradient fill for the default palette. > > I calculated the values at 11 equally spaced points and converted them > into hex numbers, now stored in /data. PostScript terminal currently > draws 1024 single-color rectangles. Does anyone notice any difference > in the palette produced by gradient fill and the one produced by 1024 > samples? Aha. You are using Level 3 extensions to PostScript. They are not mentioned in the PostScript Language Reference Manual (2nd Edition) that I have on my shelf. Your test file displays on my older machines, which surprises me, but the result looks truly awful. My new machines have a newer gs installed that does indeed support these extensions. I guess I should go out and buy a new copy of the Language Reference Manual. If we were to adopt this approach, we would have to wrap it in a test for level capabilities so that Level 1/2/3 devices would all do something reasonable. That is certainly possible, but could be done more easily by an expert. Harald Harders and I muddled our way through something similar for the pattern-fill support, which is a Level 2 extension, but it was a struggle. > > OK. How about PDF, does that have more features like gradient fill than does P.S.? > > PS *does have* gradient fill. Sufficiently new versions of it [Level 3]. > OK. Let me try to explain, For drawing the "plotting area" in this > image (http://gnuplot.sourceforge.net/demo_4.1/pm3d.8.png), which is > nothing else but a bitmap image, gnuplot calls my terminal > term->set_color(...) > term->fillbox(...) > 49 x 49 times. For bitmap teminal this doesn't really matter, but for > my terminal it means constructing 49x49 paths and fill each one of > them separately (bot at compile time of the image and when displaying > it in GhostView or Acrobat), not to mention aliasing-artefacts (I > don't know how they are called, but GhostView shows white stripes all > over the plot). Yeah, we know. That is the down-side of newer versions of gs/gv/ghostview. They have a bad aliasing bug. It's a known bug, but even if they fix it there will be a lot of broken installations for a long time to come. > This is extremely inefficient. It would be much better > if gnuplot would call a routine > term->image(49,49, ....) > The result would be the visually the same (only better since no > artefacts would occur) and both compiling and rendering would be more > efficient. If the driver doesn't support "images", it can still draw > 49 times 49 filled rectangles. But how does the higher level code tell a driver what to put in those 49x49 boxes? In the general case each one has a different color, so I do not see how you end up saving anything. -- Ethan A Merritt Biomolecular Structure Center University of Washington, Seattle WA |