Bug 687789 - lines in antialiased tesselated polygon rendering
Summary: lines in antialiased tesselated polygon rendering
Status: RESOLVED DUPLICATE of bug 687742
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: Graphics Library (show other bugs)
Version: 8.14
Hardware: All All
: P2 normal
Assignee: Jack Moffitt
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-07 05:53 UTC by Adolf Mathias
Modified: 2007-12-13 12:55 UTC (History)
0 users

See Also:
Customer:
Word Size: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adolf Mathias 2004-11-07 05:53:33 UTC
When rendering tesselated polygons using -dGraphicsAlphaBits, I get thin white
lines along the tesselation lines. Using coordinates generated e.g. by arc,
they're not there. (Tested with 8.14 under both Linux and Windows, using the X11
display driver and several 24 bit bitmap drivers)

%!/PS-Adobe-2.0
% gs -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -r72 -g600x600

/buf 64 string def
/tri                       % x0 y0 x1 y1 x2 y2   tri  x0 y0 x2 y2   draws a triangle
{ 4 2 roll moveto 2 copy lineto

  % print device coords of x2 y2
  2 copy transform exch
  (x:) print buf cvs print (\ty:) print buf cvs print (\n) print
  3 index 3 index lineto fill
} def

% A circle flattened down to an octagon, tesselated
/test1
{ 100 setflat
  300 300 200 -90 270 arc flattenpath
  { 2 copy }
  { tri }
  { 6 -2 roll tri 4 -2 roll tri tri }
  { 3 index 3 index tri pop pop pop pop }
  pathforall
} def

/test2
{ gsave 300 300 translate 200 200 scale 0 setlinewidth
  -90  dup cos 1 index sin 2 copy 5 -1 roll
  45   exch 1 index add exch
  270  { dup cos exch sin tri } for
  pop pop pop pop
  grestore
} def

test1
showpage
test2
showpage
Comment 1 Jack Moffitt 2004-11-08 08:07:38 UTC
It looks to me that you are dividing everything into adjoining triangles.  If
you do this, you are going to see the white lines you are talking about due to
antialiasing (it's probably there with varying degree depending on resolution).
 This is just a standard antialiasing artifact, not a bug in Ghostscript.
Comment 2 Alex Cherepanov 2005-07-27 12:56:20 UTC
Just linking similar bug reports together.


*** This bug has been marked as a duplicate of 687742 ***