|
From: Petr M. <mi...@ph...> - 2005-07-20 07:44:37
|
> Yes, exactly. That is functionally how the current code in color.c
> works, but the routines are not wrapped as terminal entry calls.
> It has a generic default routine for any terminal that supports
> pm3d filled rectangles:
> draw_inside_color_smooth_box_bitmap()
> and a special case for the postscript driver:
> draw_inside_color_smooth_box_postscript()
>
> As it happens, we have a bug report outstanding that the colorbox
> produced by this postscript special case code does not display
> properly in recent ghostscript/ghostview versions. So another
> option is to get rid of it altogether, assuming the generic routine
> doesn't suffer the same problem. How much optimization is it worth
> just to draw the colorbox?
That's not bug of recent versions, but the old bug in pm3d postscript
code visible when switching on aliasing in postscript. I though it was
fixed, but it does not seem so. The point was that "fill" draws only inside
of the area, not the path itself.
Solution: add stroke into /f and /h:
--- post-orig.trm 2005-07-20 09:23:00.000000000 +0200
+++ post.trm 2005-07-20 09:40:59.083990556 +0200
@@ -258,7 +258,7 @@
"/V {rlineto} bind def\n",
"/N {newpath moveto} bind def\n",
"/C {setrgbcolor} bind def\n",
-"/f {rlineto fill} bind def\n",
+"/f {rlineto gsave stroke grestore fill} bind def\n",
"/vpt2 vpt 2 mul def\n",
"/hpt2 hpt 2 mul def\n",
/* flush left show */
@@ -619,7 +619,7 @@
"/PolyFill {gsave Density fill grestore grestore} def\n",
/* Special short form for the common case of a solid quadrangle */
-"/h {rlineto rlineto rlineto gsave fill grestore} bind def\n",
+"/h {rlineto rlineto rlineto gsave stroke grestore gsave fill grestore}
bind def\n",
"%\n",
"% PostScript Level 1 Pattern Fill routine for rectangles\n",
I've just tested it and it works. I think I can put it into cvs?
---
PM
|