[comp.windows.news] Bugs in NeWS on a SUN

siegel@hc.DSPO.GOV (Josh Siegel) (02/01/88)

I plan on trying to answer NeWS questions on the net as well
as posting bugs and gotya's as I find them.  The reason is
that the people at Sun who are writting NeWS are not in charge
of NeWS.  The people in charge are the administation people
who are pushing to get it out the door.

As a result,  many many bugs are not being fixed so I will try
to help the rest of the world and respond with fixes and comments...

In article <539@modular.UUCP> hagen@modular.UUCP (Jeff Hagen) writes:
>
>RE: NeWS on Sun
>
>Is there a limit to the size NeWS allows on the scale and translate functions?
>For example,
>
>% this draws a 45 degree line
>gsave -10 -20 translate 10 20 moveto 82 92 lineto stroke grestore
>
>% but this doesn't:
>gsave -100000 -200000 translate 100000 200000 moveto 100144 200144 lineto
>stroke grestore

Yes... there is a bug.  All points in news are handled in only 16
bits.  The best way of seeing this is to do:

initmatrix 100000 100000 translate [0 0 0 0 0 0] currentmatrix pstack

This will show the current translation matrix as 32768.

>
>This doesn't cause an error, but it seems to be ignored.
>I found that translate on the order of 10000 will work as advertized.
>The problem can be fixed of course by prescaling the data before plotting,
>but I don't see any reason ( at least from the NeWS manuals ) why this shouldn't
>work.

One work around was something we did with one of our larger NeWS
applications which was to make a "mmoveto", "mlineto", and a 
"mtranslate" function.  These funtions did the translations before
passing them to NeWS.

>
>Also, has anybody gone to the trouble of writing a key-repeat function 
>in NeWS?  I suspect it is possible by waiting for the up-transition
>a certain time after the down transition...

NeWS has them in version 1.1.  Soon to be released.

>
>Jeff Hagen  arizona!modular!hagen
-- 
Josh Siegel		(siegel@hc.dspo.gov)
I like using a C-47A "puff dragon" to go hunting with.