SUN GKS 2.1 versus 2.2
Marcel Bernards
marcel at ecn.ecn
Tue May 30 21:38:58 AEST 1989
Recently I finally got an upgrade for SUN GKS 2.2 (running 4.0.1 here)
When our GKS programmer updated his program using GKS and FORTRAN 1.1
the program behaved different when using a Postscript device.
When he inverted the GKS screen (gkstool) the postscript screen changes too.
this was not in 2.1 GKS !!
I hacked through the postscript file and indeed a setgray command had a 1.0000
argument instead of 0.0000
here the piece of calls he made:
[ stuff deleted ]
c--- open POSTSCRIPT_file (unit= 95) ----------------------------
c
OPEN(95,FILE=UPOSTS,STATUS='UNKNOWN')
REWIND(95)
C-----------------------------OPEN WK
CALL GOPWK(4,95,POSTSC)
C-----------------------------ACTIVATE WK
CALL GACWK(4)
ENDIF
[ stuff deleted ]
IF(IO.GT.0) THEN
c
c--- open DEVICE_WORKSTATION_file --(unit = 93) ----------------
c
IOUNIT=93
IF(INTACT .GT. 0 ) THEN
c
c--- interactive workstation --------------------------------
c--- open GKS standard output_file
c
*IF DEF,VAXVMS,1
* IOUNIT=6
OPEN(IOUNIT,FILE=OUTGKS,STATUS='UNKNOWN')
ELSE
c
c--- non interactive workstation -----------------------------
c--- open GKS device output_file
c
OPEN(IOUNIT,FILE=DEVCFN,STATUS='UNKNOWN')
ENDIF
C-----------------------------OPEN WK
CALL GOPWK(1,IOUNIT,LDEV)
C-----------------------------ACTIVATE WK
CALL GACWK(1)
IF ( INTACT .GT. 0 .AND. SWBGRD .NE. 0) THEN
c
c----------------------------- switch background / foreground
C- YECH !!!! Postscript page is empty now in GKS 2.2 after these calls !!!
C- this was not the case in 2.1 GKS !!!!
c
CALL GSCR(1, 0, BRED, BGREEN, BBLUE)
CALL GSCR(1, 1, FRED, FGREEN, FBLUE)
CALL GCLRWK(1)
ENDIF
If we read the SUN GKS manual the trivial grayscale formulae is a
subject for discussion:
greyscale = 1.0 - ( 0.30*Red + 0.59*Green + 0.11*Blue )
table B-36 on page 482 of the SUN GKS 2.2 manual describes a
color Bundle Table ---Intensity--- index
CI Descr. R.I G.I B.I
0 black 0.0 0.0 0.0
1 White 1.0 1.0 1.0
etc.
the formulae however implies mixing colors as paint and _not_ as light.
Why does these two versions differ in this case and why is the PostScript
output affected by the invert screen calls ??
Any suggestions welcome !!
greetings.
Marcel Bernards, UNIX & Net sysadm Netherlands Energy Research Foundation ECN
P.O. Box 1, 1755 ZG Petten, PHONE: 09 312246 4342 EARN/BITNET:ESU0130 at HPEENR51
IP: marcel%ecn.uucp at nluug.nl UUCP: marcel at ecn.uucp,marcel%ecn.uucp at uunet.uu.net
SCREAMNet : AAAAAARGHH!HUH?? : Disclaimer: "The AntiChrist is the Computer !"
More information about the Comp.sys.sun
mailing list