int clchar() { short xy[8],cellw,junk2,junk3=0; short mcto; if(cwin==-1)return 0; junk3=findcurpos(); vqt_width(ws.handle,*(wn[cwin].inp+junk3-1),&cellw,&junk2,&junk2); mcto=fdtc(); xy[0]=wn[cwin].wwa.g_x+mcto;xy[1]=wn[cwin].wwa.g_y+wn[cwin].wwa.g_h-ith/8*7-1; xy[2]=wn[cwin].wwa.g_x+mcto-cellw;xy[3]=wn[cwin].wwa.g_y+wn[cwin].wwa.g_h-ith/8*7-1; xy[4]=wn[cwin].wwa.g_x+mcto-cellw;xy[5]=wn[cwin].wwa.g_y+wn[cwin].wwa.g_h-ith/4-1; xy[6]=wn[cwin].wwa.g_x+mcto;xy[7]=wn[cwin].wwa.g_y+wn[cwin].wwa.g_h-ith/4-1; v_fillarea(ws.handle,4,xy); return 0; }
void scrolldown(void) { short xy[8]; startupdate(); xy[0]=wn[cwin].wwa.g_x;xy[1]=wn[cwin].wwa.g_y; xy[2]=wn[cwin].wwa.g_x+wn[cwin].wwa.g_w-1;xy[3]=wn[cwin].wwa.g_y+wn[cwin].wwa.g_h-ith*2-VT-th; xy[4]=wn[cwin].wwa.g_x;xy[5]=wn[cwin].wwa.g_y+th; xy[6]=wn[cwin].wwa.g_x+wn[cwin].wwa.g_w-1;xy[7]=wn[cwin].wwa.g_y+wn[cwin].wwa.g_h-ith*2-VT; vro_cpyfm(ws.handle,S_ONLY,xy,&scr,&scr); xy[0]=wn[cwin].wwa.g_x;xy[1]=wn[cwin].wwa.g_y; xy[2]=wn[cwin].wwa.g_x+wn[cwin].wwa.g_w-1;xy[3]=wn[cwin].wwa.g_y; xy[6]=wn[cwin].wwa.g_x;xy[7]=wn[cwin].wwa.g_y+th; xy[4]=wn[cwin].wwa.g_x+wn[cwin].wwa.g_w-1;xy[5]=wn[cwin].wwa.g_y+th; v_fillarea(ws.handle,4,xy); finishupdate(); }
int cdecl draw_pencil(PARMBLK *parmblk) { WEXTENSION_PENCIL *wext = (WEXTENSION_PENCIL *) parmblk->pb_parm ; int xy[8] ; int xc, yc ; xy[0] = parmblk->pb_x ; xy[1] = parmblk->pb_y ; xy[2] = parmblk->pb_x+parmblk->pb_w-1 ; xy[3] = parmblk->pb_y+parmblk->pb_h-1 ; vs_clip(handle, 1, xy) ; xc = (xy[0]+xy[2])/2 ; yc = (xy[1]+xy[3])/2 ; vswr_mode(handle, MD_REPLACE) ; vsf_interior(handle, FIS_SOLID) ; vsf_color(handle, 0) ; vr_recfl(handle, xy) ; vsf_color(handle, wext->pencil.color) ; switch( wext->pencil.type ) { case 0 : xy[0] = xc-wext->pencil.height/2 ; xy[1] = yc-wext->pencil.height/2 ; xy[2] = xc+wext->pencil.height/2 ; xy[3] = yc+wext->pencil.height/2 ; vr_recfl(handle, xy) ; break ; case 1 : v_circle(handle, xc, yc, wext->pencil.height/2) ; break ; case 2 : xy[0] = xc ; xy[1] = yc-wext->pencil.height/2 ; xy[2] = xc+wext->pencil.height/2 ; xy[3] = yc ; xy[4] = xc ; xy[5] = yc+wext->pencil.height/2 ; xy[6] = xc-wext->pencil.height/2 ; xy[7] = yc ; v_fillarea(handle, 4, xy) ; break ; } vs_clip(handle, 0, xy) ; return(0) ; }
/* draw the given set of points using a mark: this replaces v_pmarker, which is not implemented in fVDI on the Firebee 1 = dot, 2 = plus, 3 = star, 4 = square, 5 = cross, 6 = diamond Note: only 3-pt size used here. Not adjustable in line-chart. vsm_height can alter the size, for the built in pmarker. */ void my_pmarker (int app_handle, int point_style, int num_points, int * points) { int i; int s = 3; /* size of graphic to draw */ /* ensure line style solid, and fill type hollow */ vsl_type (app_handle, SOLID); vsf_interior (app_handle, 0); for (i = 0; i < num_points; i += 1) { int x = points[2*i]; int y = points[2*i+1]; int pxy[10]; switch (point_style) { case 1: /* dot */ v_circle (app_handle, x, y, 1); break; case 2: /* plus */ pxy[0] = x; pxy[1] = y-s; pxy[2] = x; pxy[3] = y+s; v_pline (app_handle, 2, pxy); pxy[0] = x-s; pxy[1] = y; pxy[2] = x+s; pxy[3] = y; v_pline (app_handle, 2, pxy); break; case 3: /* star */ pxy[0] = x; pxy[1] = y-s; pxy[2] = x; pxy[3] = y; pxy[4] = x-2*s/3; pxy[5] = y+s; v_pline (app_handle, 3, pxy); pxy[0] = x-s; pxy[1] = y-s; pxy[2] = x; pxy[3] = y; pxy[4] = x+2*s/3; pxy[5] = y+s; v_pline (app_handle, 3, pxy); pxy[0] = x+s; pxy[1] = y-s; pxy[2] = x; pxy[3] = y; v_pline (app_handle, 2, pxy); break; case 4: /* square */ pxy[0] = x-s; pxy[1] = y-s; pxy[2] = x+s; pxy[3] = y-s; pxy[4] = x+s; pxy[5] = y+s; pxy[6] = x-s; pxy[7] = y+s; pxy[8] = x-s; pxy[9] = y-s; v_fillarea (app_handle, 5, pxy); break; case 5: /* cross */ pxy[0] = x-s; pxy[1] = y-s; pxy[2] = x+s; pxy[3] = y+s; v_pline (app_handle, 2, pxy); pxy[0] = x+s; pxy[1] = y-s; pxy[2] = x-s; pxy[3] = y+s; v_pline (app_handle, 2, pxy); break; case 6: /* diamond */ pxy[0] = x; pxy[1] = y-s; pxy[2] = x-s; pxy[3] = y; pxy[4] = x; pxy[5] = y+s; pxy[6] = x+s; pxy[7] = y; pxy[8] = x; pxy[9] = y-s; v_fillarea (app_handle, 5, pxy); break; } } }