We run NCAR Graphics 3.2 on SunOS 4 and 3.2.1 on DEC Alpha OSF/1.
When we tried to use C language interface of GKS,
we found that the function ginq_norm_tran (inquire normal
transformation, equivalent to GQNT in Fortran) did not work as expected.
The following patch to src/ncarg2d/src/libncarg_gksC/awic/s_gqnt.c
seems to work.
===== BEGIN s_gqnt.diff
--- s_gqnt.orig.c Mon Jun 26 17:47:47 1995
+++ s_gqnt.c Thu Jun 29 14:59:57 1995
@@ -2,7 +2,9 @@
* $Id: s_gqnt.c.sed,v 1.3 1993/01/08 17:00:04 haley Exp $
*/
/*
- * Inquire normalization transformation
+ * Inquire normalization transformation
+ *
+ * tentatively revised by K. Masuda (Tokyo Metro. Univ.), 1995-06-26
*/
#include <ncarg/gks.h>
@@ -20,9 +22,16 @@
Gtran *norm_tran;
#endif
{
- gqnt_(&num,err_ind,&norm_tran->win.x_min,&norm_tran->win.x_max,
- &norm_tran->win.y_min,&norm_tran->win.y_max,
- &norm_tran->vp.x_min, &norm_tran->vp.x_max,
- &norm_tran->vp.y_min, &norm_tran->vp.y_max);
+ Gfloat window[4], viewpt[4];
+
+ gqnt_(&num, err_ind, window, viewpt);
+ norm_tran->win.x_min = window[0];
+ norm_tran->win.x_max = window[1];
+ norm_tran->win.y_min = window[2];
+ norm_tran->win.y_max = window[3];
+ norm_tran->vp.x_min = viewpt[0];
+ norm_tran->vp.x_max = viewpt[1];
+ norm_tran->vp.y_min = viewpt[2];
+ norm_tran->vp.y_max = viewpt[3];
}
===== END s_gqnt.diff
-- Kooiti MASUDA Dept. of Geography, Tokyo Metropolitan University e-mail (internet): masuda AT unknown
This archive was generated by hypermail 2b29 : Wed Jun 28 2000 - 09:40:25 MDT