[Search for users]
[Overall Top Noters]
[List of all Conferences]
[Download this site]
Title: | DECWINDOWS 26-JAN-89 to 29-NOV-90 |
Notice: | See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit |
Moderator: | STAR::VATNE |
|
Created: | Mon Oct 30 1989 |
Last Modified: | Mon Dec 31 1990 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 3726 |
Total number of notes: | 19516 |
1993.0. "vt340 emulation and gks" by PRSPSU::RAOULT (Fabrice S P S Paris ...) Wed Jan 03 1990 11:24
hi everybody,
configuration: VMS5.2 decwindows 1.0 gks4.0
Vs3100+VR290.
i have one customer which runs an old application including
smg,regis,fms and gks inside a terminal emulation VT340 on decwindows.
THe first problem is that Gks can't draw on the whole width.
If you increase the high of the page up to 27 lines you draw on the full
width.It is not the solution for my customer because Fms uses the 24th
line as dialog and it overstrikes the drawing.
The second one is that if you use the bitmask for the VT340
to restore the color map (%X 01000010)it doesn't work with decwindows.
My problems may be produce with the programm request locator at
the bottom of this note.
any ideas ?
thanks.
/* prog request locator
gks$wstype %x00010011 vt340 without mouse*/
#include <gksdefs>
#include <gksmsgs>
#include <descrip>
#include <stdio>
#define OK 0
#define devno 1 /* 2 = Arrow keys of KEYBOARD */
main()
{
char cr;
int wsid = 1, echo_type = 3, len_data = 0, data[2],trans = 2;
int status = GKS$K_STATUS_NONE, color = 2
, raster_x, raster_y, meters, DEFAULT = 0;
float x1, y1, x2, y2, x[4], y[4], earea[4]
, red_int, green_int, blue_int, device_x, device_y, x_ratio,y_ratio;
$DESCRIPTOR (error_file,"SYS$ERROR");
/* Initialisation de GKS */
color = 1;
gks$open_gks (&error_file);
gks$open_ws (&wsid, &GKS$K_CONID_DEFAULT, &GKS$K_WSTYPE_DEFAULT);
gks$activate_ws (&wsid);
gks$set_defer_state (&wsid, &GKS$K_ASAP, &GKS$K_IRG_ALLOWED);
/* Faire les inquires */
gks$inq_max_ds_size (&GKS$K_WSTYPE_DEFAULT, &status, &meters
, &device_x, &device_y, &raster_x, &raster_y);
gks$inq_predef_color_rep (&GKS$K_WSTYPE_DEFAULT, &color, &status
, &red_int, &green_int, &blue_int);
if ( device_x > device_y)
{
x_ratio = 1.0;
y_ratio = device_y/device_x;
}
else
{
y_ratio = 1.0;
x_ratio = device_y/device_x;
}
gks$set_window(&trans,&0.0,&4000.0,&0.0,&4000.0);
gks$set_viewport(&trans,&0.0,&x_ratio,&0.0,&y_ratio);
gks$select_xform(&trans);
gks$set_ws_window ( &wsid,&0.0,&x_ratio,&0.0,&y_ratio);
gks$set_ws_viewport(&wsid,&0.0,&device_x,&0.0,&device_y);
gks$set_viewport_priority (&trans,&DEFAULT,&GKS$K_INPUT_PRIORITY_HIGHER);
earea[0] = 0.0;
earea[1] = device_x;
earea[2] = 0.0;
earea[3] = device_y;
gks$init_locator (&wsid, &devno, &0.5, &0.5, &0, &echo_type
, &earea, &data, &len_data);
while (status == GKS$K_STATUS_NONE)
gks$request_locator (&wsid, &devno, &status, &0, &x1, &y1);
printf("X1 = %f Y1 = %f \n",x1,y1);
gks$set_color_rep (&wsid, &color, &1.0, &0.0, &0.0);
echo_type = 5;
data[0] = GKS$K_ACF_POLYLINE;
data[1] = GKS$K_ACF_CURRENT;
len_data = 8;
gks$init_locator (&wsid, &devno, &x1, &y1, &0, &echo_type
, &earea, &data, &len_data);
status = GKS$K_STATUS_NONE;
while (status == GKS$K_STATUS_NONE)
gks$request_locator (&wsid, &devno, &status, &0, &x2, &y2);
printf("X2 = %f Y2 = %f\n",x2,y2);
gks$set_color_rep (&wsid, &color, &red_int, &green_int, &blue_int);
x[0] = x1;
x[1] = x1;
x[2] = x2;
x[3] = x2;
y[0] = y1;
y[1] = y2;
y[2] = y2;
y[3] = y1;
gks$set_fill_int_style (&GKS$K_INTSTYLE_HATCH);
gks$fill_area (&4, &x, &y);
printf ("Press RETURN to EXIT.\n");
cr = getchar();
/* Fermeture de tout proprement */
gks$deactivate_ws (&wsid);
gks$close_ws (&wsid);
gks$close_gks ();
}
T.R | Title | User | Personal Name | Date | Lines |
---|
1993.1 | | SITBUL::KLEINSORGE | So sue me. | Wed Jan 03 1990 12:13 | 24 |
|
ReGIS very carefully never defined any relationship between the ANSI
display and the ReGIS display. Thus, users should not count on any
alignment between (non-ReGIS) text and ReGIS graphics.
That said, the problem is that you need a surface that is 800x480
pixels or that has that approximate shape to be compatable with the
VT200/VT300 terminals. To get this shape, text characters for 80
columns must be 20 pixels tall and 10 pixels wide. This exactly matches
the size of both the VT200 and VT300 series terminals (the VT200 used a
2:1 aspect and only had 240 scanlines using a odd-y addressing scheme).
For 132-columns I think it was something like 20 tall and 6 pixels wide
(792 pixels).
DECterm does not provide a 20x10 pixel font set, the closest it provides
is the BIG font 132 column. The 80 column is 11 pixels wide making a
880 x 240 window.
How ReGIS maps it surface is left to the developer within constraints.
One of which is that the aspect ratio be preserved of 1:1. What you
are seeing is the artifacts of the size of the fonts and the mapping
of DECterm/ReGIS of the screen.
|
1993.2 | Need more information about the second question | HANNAH::MESSENGER | Bob Messenger | Wed Jan 03 1990 18:57 | 10 |
| Re: .0
> The second one is that if you use the bitmask for the VT340
> to restore the color map (%X 01000010)it doesn't work with decwindows.
Could you explain this a little more? I assume you're talking about some kind
of GKS call, but do you know what ReGIS commands it's using? (SET HOST/LOG
might be one way to find out.)
-- Bob
|
1993.3 | bitmask for vt340 | PRSPSU::RAOULT | Fabrice S P S Paris ... | Fri Jan 05 1990 10:13 | 6 |
| for the second it's very simple if you use Gks on a
vt340 and your program changes the color map you can get back your
originals colors in using this bitmask .
The same program used on VT340 emulation with Decwindows
doesn't restore the originals colors after a normal close of gks.
thanks.
|
1993.4 | | NOON::MESSENGER | Bob Messenger | Fri Jan 05 1990 12:33 | 11 |
| Re: .3
> for the second it's very simple if you use Gks ...
But I don't. :-)
I'd suggest submitting a QAR about the second question, since it sounds
like it would take some time to investigate. (Unless a GKS guru has an
idea about what's going on.)
-- Bob
|