[comp.windows.news] bugs in transformations

ads@cs.qmc.ac.uk (Adam Billyard) (11/29/88)

If you run the following program, it prints the path it creates
which turns out to be null!

/largepath
{
  gsave
    [5200 0 0 5000 -2300 -2300] setmatrix       % just for terseness
    newpath 0 0 1 0 360 arc                     % draw a big circle
    currentpath ==
  grestore
} def
largepath

or try

20000 2 mul ==                          % answer 40000
[20000 0 0 20000 0 0] setmatrix
2 2 scale matrix currentmatrix ==       % answer not 40000 for element 0

NeWS seems to have problems with the CTM if the numbers are
larger than fixedpoint can handle (> 32000). This manifests
itself in null paths for large shapes etc. The irritating thing
is that the automatic conversion from fixed to floats works for
overflowed numbers operated on by 'mul' but not in the multiply
used for matrix multiplication.

My question is, is there anything I can do about this? We have
NeWS 1.1 source code, but I would prefer some black art to
coerce NeWS into doing the right thing..

        Cheers,

                Adam Billyard

JANET: ads@cs.qmc.ac.uk
UUCP:  uunet!ukc!qmc-cs!ads
ARPA:  ads%cs.qmc.ac.uk@nss.cs.ucl.ac.uk