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

Bug#4306: gs and rounded corner rectangle



Package: gs
Version: 4.01-2

A rectangle drawn with rounded corners from xfig is not displayed
correctly with gs 4.01-2.

The following patch is supposed to fix this, according to an article
I read in the news.

*** gspath1.c.orig      Fri Jul 26 09:17:35 1996
--- gspath1.c   Fri Jul 26 09:18:35 1996
***************
*** 170,176 ****
                        yt0 = ay1 + dy0 * l0;
                        xt2 = ax1 + dx2 * l2;
                        yt2 = ay1 + dy2 * l2;
!                       code = arc_add(pgs, true, arad, xt0, yt0, xt2, yt2, ax1, ay1);
                   }
           }
        if ( retxy != 0 )
--- 170,176 ----
                        yt0 = ay1 + dy0 * l0;
                        xt2 = ax1 + dx2 * l2;
                        yt2 = ay1 + dy2 * l2;
!                       code = arc_add(pgs, arc_lineto, arad, xt0, yt0, xt2, yt2, ax1, ay1);
                   }
           }
        if ( retxy != 0 )

Here's an example which triggers the bug.

#!/bin/sh
# This is a shell archive (produced by GNU sharutils 4.2).
# To extract the files from this archive, save it to some FILE, remove
# everything before the `!/bin/sh' line above, then type `sh FILE'.
#
# Made on 1996-08-27 10:47 MET DST by <ig25@mvmap83>.
# Source directory was `/home/ig25'.
#
# Existing files will *not* be overwritten unless `-c' is specified.
#
# This shar contains:
# length mode       name
# ------ ---------- ------------------------------------------
#   2790 -rw-r----- unnamed.eps
#    130 -rw-r----- unnamed.fig
#
save_IFS="${IFS}"
IFS="${IFS}:"
gettext_dir=FAILED
locale_dir=FAILED
first_param="$1"
for dir in $PATH
do
  if test "$gettext_dir" = FAILED && test -f $dir/gettext \
     && ($dir/gettext --version >/dev/null 2>&1)
  then
    set `$dir/gettext --version 2>&1`
    if test "$3" = GNU
    then
      gettext_dir=$dir
    fi
  fi
  if test "$locale_dir" = FAILED && test -f $dir/shar \
     && ($dir/shar --print-text-domain-dir >/dev/null 2>&1)
  then
    locale_dir=`$dir/shar --print-text-domain-dir`
  fi
done
IFS="$save_IFS"
if test "$locale_dir" = FAILED || test "$gettext_dir" = FAILED
then
  echo=echo
else
  TEXTDOMAINDIR=$locale_dir
  export TEXTDOMAINDIR
  TEXTDOMAIN=sharutils
  export TEXTDOMAIN
  echo="$gettext_dir/gettext -s"
fi
touch -am 1231235999 $$.touch >/dev/null 2>&1
if test ! -f 1231235999 && test -f $$.touch; then
  shar_touch=touch
else
  shar_touch=:
  echo
  $echo 'WARNING: not restoring timestamps.  Consider getting and'
  $echo "installing GNU \`touch', distributed in GNU File Utilities..."
  echo
fi
rm -f 1231235999 $$.touch
#
if mkdir _sh19142; then
  $echo 'x -' 'creating lock directory'
else
  $echo 'failed to create lock directory'
  exit 1
fi
# ============= unnamed.eps ==============
if test -f 'unnamed.eps' && test "$first_param" != -c; then
  $echo 'x -' SKIPPING 'unnamed.eps' '(file already exists)'
else
  $echo 'x -' extracting 'unnamed.eps' '(binary)'
  sed 's/^X//' << 'SHAR_EOF' | uudecode &&
begin 600 unnamed.eps
M)2%04RU!9&]B92TR+C`@15!31BTR+C`*)254:71L93H@=6YN86UE9"YE<',*
M)25#<F5A=&]R.B!F:6<R9&5V(%9E<G-I;VX@,RXQ(%!A=&-H;&5V96P@,0HE
M)4-R96%T:6]N1&%T93H@5'5E($%U9R`R-R`Q,#HT-3HP-"`Q.3DV"B4E1F]R
M.B!I9S(U0&UV;6%P.#,@*%1H;VUA<R!+;V5N:6<I"B4E3W)I96YT871I;VXZ
M($QA;F1S8V%P90HE)4)O=6YD:6YG0F]X.B`P(#`@-C8@.#,*)25086=E<SH@
M,`HE)4)E9VEN4V5T=7`*)25);F-L=61E1F5A='5R93H@*E!A9V53:7IE($QE
M='1E<@HE)45N9%-E='5P"B4E16YD0V]M;65N=',*+R1&,G!S1&EC="`R,#`@
M9&EC="!D968*)$8R<'-$:6-T(&)E9VEN"B1&,G!S1&EC="`O;71R>"!M871R
M:7@@<'5T"B]C;VPM,2![?2!D968*+V-O;#`@>S`N,#`P(#`N,#`P(#`N,#`P
M('-R9V)](&)I;F0@9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
M(')E<&5A="!C;'`@(&=S(&-O;"TQ(',@9W(@"B1&,G!S16YD"G)E<W1O<F4*
`
end
SHAR_EOF
  $shar_touch -am 0827104396 'unnamed.eps' &&
  chmod 0640 'unnamed.eps' ||
  $echo 'restore of' 'unnamed.eps' 'failed'
  if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \
  && ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then
    md5sum -c << SHAR_EOF >/dev/null 2>&1 \
    || $echo 'unnamed.eps:' 'MD5 check failed'
d1552e8761be4db8312cb97d8dfb0ffc  unnamed.eps
SHAR_EOF
  else
    shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'unnamed.eps'`"
    test 2790 -eq "$shar_count" ||
    $echo 'unnamed.eps:' 'original size' '2790,' 'current size' "$shar_count!"
  fi
fi
# ============= unnamed.fig ==============
if test -f 'unnamed.fig' && test "$first_param" != -c; then
  $echo 'x -' SKIPPING 'unnamed.fig' '(file already exists)'
else
  $echo 'x -' extracting 'unnamed.fig' '(text)'
  sed 's/^X//' << 'SHAR_EOF' > 'unnamed.fig' &&
#FIG 3.1
Landscape
Center
Inches
1200 2
2 4 0 1 -1 7 0 0 -1 0.000 0 0 7 0 0 5
X	 2400 2325 2400 1275 1050 1275 1050 2325 2400 2325
SHAR_EOF
  $shar_touch -am 0827104396 'unnamed.fig' &&
  chmod 0640 'unnamed.fig' ||
  $echo 'restore of' 'unnamed.fig' 'failed'
  if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \
  && ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then
    md5sum -c << SHAR_EOF >/dev/null 2>&1 \
    || $echo 'unnamed.fig:' 'MD5 check failed'
185a0d8b3fb93b6b8b8201ac341071cc  unnamed.fig
SHAR_EOF
  else
    shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'unnamed.fig'`"
    test 130 -eq "$shar_count" ||
    $echo 'unnamed.fig:' 'original size' '130,' 'current size' "$shar_count!"
  fi
fi
rm -fr _sh19142
exit 0
-- 
Thomas Koenig, Thomas.Koenig@ciw.uni-karlsruhe.de, ig25@dkauni2.bitnet.
The joy of engineering is to find a straight line on a double
logarithmic diagram.



Reply to: