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

20020924: how to change a frame's background color for printing (cont.)



>From: "Happel, Shelly" <address@hidden>
>Organization:  USF
>Keywords:  200209242035.g8OKZE111097 McIDAS MCGUI background

Hey Shelly,

I looked at the MCGUI procedure that saves the contents of a frame into
a PostScript (tm) file and then sends it off to a printer.  The mods
needed to add the restore of a palette to the frame before doing the
save to a file and then restoring the original palette after the file
is sent off to the printer were simple, so I made them.

I created a compressed tar file with the change (along with a couple of
other modifications that I just did in response to another inquiry) and
stuck it into the pub/mcidas/src directory of anonymous ftp on our
FTP server, ftp.unidata.ucar.edu.

Here is how to get the compressed tar file and install the new code on
your machine(s):

<login to the machine where McIDAS is installed as the user 'mcidas'>

# CD to the update directory
cd mcidas2002/update

# FTP the update file
ftp ftp.unidata.ucar.edu
  <user> anonymous
  <pass> your full email address
  cd pub/mcidas/src
  binary
  get dispvismode.tar.Z
  quit

# Unpack the file (syntax is for Linux)
tar xvzPf dispvismode.tar.Z

# CD to the src directory and remove old files from the ~mcidas/bin directory
cd ../src
rm ~mcidas/bin/mcidas
rm ~mcidas/bin/mcgui.k
rm ~mcidas/bin/upcguiprocs.tcl

# Remove the file mcidas and create a new link to it
rm mcidas
ln mcstart.gui mcidas

# Create new, needed links
ln mcidas mcgui.k upcguiprocs.tcl ~mcidas/bin

Now, the last thing you need to do is create a palette that will work
well with your printer.  If you are using a black and white PostScript
printer, I would recommend doing the following from a McIDAS session
run as the user 'mcidas':

SF 1
REDIRECT ADD BLACK* "/home/mcidas/data
GU REST GRAPHIC
GU MAKE 0 WHITE
TE SETLEVS "GU MAKE !1 BLACK
REPEAT SETLEVS 1 TO 8 BY 1
GU SAVE BLACKWHITE
GU REST GRAPHIC
REDIRECT DEL BLACK*
TD DEL SETLEVS

This sequence creates a new graphic palette named BLACKWHITE.GRX in
the /home/mcidas/data direcotry.

The REDIRECT ADD command makes sure that BLACKWHITE.GRX is created in the
/home/mcidas/data directory.  This is done so that all users McIDAS
sessions can find it.

The GU commands restore the GRAPHIC palette to frame 1; set the background
to WHITE and color levels 1 - 8 to BLACK; save the palette into BLACKWHITE.GRX;
and then restore the GRAPHIC palette.

Finally, the REDIRECTion just created is removed (it is no longer needed)
as is the McIDAS string SETLEVS.

Now, each user should be able to select the BLACKWHITE palette from the
palette selector that is presented in the print option available from the
MCGUI.

Please let me know if you run into any problems.

Tom

>From: "Happel, Shelly" <address@hidden>
>Subject: RE: 20020924: how to change a frame's background color for printing
>Date: Fri, 27 Sep 2002 10:59:28 -0400

>Hey Tom,

>Thanks for the updated information. Of course it worked perfectly! I
>appreciate your help and patience with us. I'm still interested in any
>printing ideas - but so far what we've worked out seems to be fine. Thanks
>again,

>Shelly