bug-ghostscript
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gs bug with antialiasing


From: Vincent Lefevre
Subject: gs bug with antialiasing
Date: 5 Jan 2001 14:47:11 GMT
User-agent: tin/1.4.4-20000803 ("Vet for the Insane") (UNIX) (OSF1/V4.0 (alpha))

Consider the following eps file (named test.eps):

------------------------------------------------------------------------
%!PS-Adobe-2.0 EPSF-2.0
%%Title: peau.fig
%%Creator: fig2dev Version 3.1 Patchlevel 2
%%CreationDate: Sun Jun 23 17:03:12 1996
%%For: address@hidden (Vincent Lefevre)
%Magnification: 1.00
%%Orientation: Portrait
%%BoundingBox: 0 0 559 515
%%Pages: 0
%%BeginSetup
%%IncludeFeature: *PageSize A4
%%EndSetup
%%EndComments
/$F2psDict 200 dict def
$F2psDict begin
$F2psDict /mtrx matrix put
/col-1 {0 setgray} bind def
/green {0.000 0.800 0.000 srgb} bind def
/red   {1.000 0.000 0.000 srgb} bind def
end
save
-9.0 559.0 translate
1 -1 scale

/cp {closepath} bind def
/ef {eofill} bind def
/gr {grestore} bind def
/gs {gsave} bind def
/sa {save} bind def
/rs {restore} bind def
/l {lineto} bind def
/m {moveto} bind def
/rm {rmoveto} bind def
/n {newpath} bind def
/s {stroke} bind def
/sh {show} bind def
/slc {setlinecap} bind def
/slj {setlinejoin} bind def
/slw {setlinewidth} bind def
/srgb {setrgbcolor} bind def
/rot {rotate} bind def
/sc {scale} bind def
/sd {setdash} bind def
/ff {findfont} bind def
/sf {setfont} bind def
/scf {scalefont} bind def
/sw {stringwidth} bind def
/tr {translate} bind def
/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
  4 -2 roll mul srgb} bind def
 /DrawEllipse {
        /endangle exch def
        /startangle exch def
        /yrad exch def
        /xrad exch def
        /y exch def
        /x exch def
        /savematrix mtrx currentmatrix def
        x y tr xrad yrad sc 0 0 1 startangle endangle arc
        closepath
        savematrix setmatrix
        } def

/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
/$F2psEnd {$F2psEnteredState restore end} def
%%EndProlog

$F2psBegin
10 setmiterlimit
n 0 842 m 0 0 l 595 0 l 595 842 l cp clip
 0.06000 0.06000 sc

7.500 slw
% Ellipse
n 4575 4800 2850 2850 0 360 DrawEllipse gs col-1 s gr

0.000 slw
% Polyline
n 5250 6225 m 5850 6075 l 5625 6600 l 5250 6225 l gs red ef gr
% Polyline
n 7650 8400 m 2025 8700 l 2025 8550 l 1800 8775 l 2025 9000 l 2025 8775 l
 7650 8550 l 7650 8400 l gs green ef gr
% Interp Spline
gs n 4875 5025 m
        5147.2 5223.8 5259.7 5317.5 5325 5400 curveto
        5374.9 5463.0 5448.1 5627.3 5475 5700 curveto
        5524.6 5834.1 5715.1 6104.0 5625 6300 curveto
        5600.6 6353.1 5528.9 6398.7 5475 6375 curveto
        5299.4 6297.8 5370.6 5967.1 5325 5850 curveto
        5297.0 5778.1 5224.9 5613.0 5175 5550 curveto
        5087.9 5440.0 4734.8 5392.0 4725 5175 curveto
        4722.3 5116.1 4759.8 5078.6 4875 5025 curveto
gs red ef gr  gr

/AvantGarde-Book ff 360.00 scf sf
5775 5325 m
gs 1 -1 sc (text) red 0.70 shd sh gr

$F2psEnd
rs
------------------------------------------------------------------------

When I use gv or mgv with no antialiasing, there is no problem.
But when I switch on antialiasing, the eps file is incorrectly
displayed: some parts of the figure are missing. This may be due
to a crash of gs (see below).

I can also launch gs with the arguments given by mgv (except the
"-c quit):

$ gs -dNOPLATFONTS -sDEVICE=x11alpha -dNOPAUSE -dSAFER test.eps
GNU Ghostscript 5.50 (2000-2-13)
Copyright (C) 1998 Aladdin Enterprises, Menlo Park, CA.  All rights reserved.
This software comes with NO WARRANTY: see the file COPYING for details.
Loading URWGothicL-Book font from 
/usr/local/share/ghostscript/fonts/a010013l.pfb... 2374672 908387 1398824 98176 
2 done.
GS>

So, no problem for the moment. But if I do the same thing with some
other X11 application loaded (e.g. mgv or netscape -- or anything
that uses many colors?), gs crashes:

$ gs -dNOPLATFONTS -sDEVICE=x11alpha -dNOPAUSE -dSAFER test.eps
GNU Ghostscript 5.50 (2000-2-13)
Copyright (C) 1998 Aladdin Enterprises, Menlo Park, CA.  All rights reserved.
This software comes with NO WARRANTY: see the file COPYING for details.
Loading URWGothicL-Book font from 
/usr/local/share/ghostscript/fonts/a010013l.pfb... 2374672 908387 1398824 98176 
2 done.
zsh: segmentation fault  gs -dNOPLATFONTS -sDEVICE=x11alpha -dNOPAUSE -dSAFER 
test.eps

However, under the same conditions, if I remove the -dNOPLATFONTS
or the -sDEVICE=x11alpha option, gs doesn't crash.

Note concerning my system:
$ uname -a
OSF1 lepois.loria.fr V4.0 1229 alpha

and I'm in a 8-bit graphic mode (that is, with a palette).

-- 
Vincent Lefèvre <address@hidden> - Web: <http://www.vinc17.org/> - 100%
validated HTML - Acorn Risc PC, Yellow Pig 17, Championnat International des
Jeux Mathématiques et Logiques, TETRHEX, etc.
Work: CR INRIA - computer arithmetic / PolKA research team at LORIA



reply via email to

[Prev in Thread] Current Thread [Next in Thread]