Monitor Size

Conn Copas cvc at itd.dsto.gov.au
Thu Mar 2 19:26:00 EST 1995


?Feb?28??95?09?05?11?am at bnr.ca>
Reply-To: grassu-list at max.cecer.army.mil
NNTP-Posting-Host: ux1.cso.uiuc.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Originator: daemon at ux1.cso.uiuc.edu


Paul Loechl had problems with some monitor-sizing code I posted recently. His
compiler rightly produced warnings about what I presume to be undeclared data
types. Here is a fix:

        get_aspect(pref_rows,pref_cols,me,dpy, scrn)
--->    int *pref_rows, *pref_cols, scrn;
        char *me;
--->    Display *dpy;

This code only takes effect if XDRIVER_HEIGHT or WIDTH are undefined in the
environment. Defining these variables in one's .grassrc file causes them to
be exported to the environment upon entry to Grass. 

Bear in mind that the logic of all this aspect ratio calculation is not
necessarily applicable in the case of 3d viewing. I would prefer to be able to
toggle a 'preserve apsect ratio upon resize' option on and off.

There is an interesting but unpublicised feature of XDRIVER/Serve_Xevent.c
which allows one to employ an environment variable called XDRIVER_RESIZER.
This defines a shell command which is executed whenever a monitor resize is
detected. Presumably, some combination of d.save and other commands would be
suitable here. Has anyone played with this? 

-- 
Conn V Copas
Information Technology Division
Defence Science and Technology Organisation
PO Box 1500
Salisbury            tel: +61 (0)8 25 95349
SA  5108             fax: +61 (0)8 25 96781
Australia       e-mail: cvc at itd.dsto.gov.au
-------------------------------------------          




More information about the grass-user mailing list