Beispiel #1
0
/* V_BEZ( 6, 13 )   */
void	_v_bez( WORD handle, WORD count, WORD *xyarr,
				 BYTE *bezarr, WORD *extent, WORD *totpts,
				 WORD *totmoves )
{
	BYTE	*tmp;
	WORD	i;
	
	pb.ptsin = xyarr;
	pb.ptsout = extent;
	
	contrl[0] = 6;
	contrl[1] = count;
	contrl[3] = (count+1)>>1;
	contrl[5] = 13;
	contrl[6] = handle;
	
	tmp = (BYTE *) intin;
	
	for( i = 0; i < count; i += 2, bezarr += 2 )
	{
		*tmp++ = bezarr[1];
		*tmp++ = bezarr[0];
	}
	
	vdi( &pb );
	
	*totpts = intout[0];
	*totmoves = intout[1];
	
	pb.ptsin = ptsin;
	pb.ptsout = ptsout;
}
Beispiel #2
0
/* --------------------- */
void inst_font(void)
{
VDIPB vdipb;

_VDIParBlk.contrl[0]	 = 119;
_VDIParBlk.contrl[1]  = 0;
_VDIParBlk.contrl[2]  = 0;
_VDIParBlk.contrl[3]  = 1;
_VDIParBlk.contrl[4]  = 1;
_VDIParBlk.contrl[6]  = vdi_handle;
_VDIParBlk.contrl[7]	 = scrtchp >> 16;
_VDIParBlk.contrl[8]	 = scrtchp;
_VDIParBlk.contrl[9]	 = 0xCC << 1;
_VDIParBlk.contrl[10] = (long)fnt_point[akt_id] >> 16;
_VDIParBlk.contrl[11] = (int)fnt_point[akt_id];
_VDIParBlk.intin[0] 	 = 1;

vdipb.contrl = _VDIParBlk.contrl;
vdipb.intin = _VDIParBlk.intin;
vdipb.ptsin = _VDIParBlk.ptsin;
vdipb.intout = _VDIParBlk.intout;
vdipb.ptsout = _VDIParBlk.ptsout;

vdi(&vdipb);
}
Beispiel #3
0
void v_clsvwk(int16_t handle)
{
   vdi_control[0] = 101;
   vdi_control[1] = 0;
   vdi_control[3] = 0;
   vdi_control[6] = handle;

   vdi();
}
Beispiel #4
0
/* CLOSE BITMAP (VDI 101, 1)  */
void  v_clsbm( WORD handle )
{
   contrl[0] = 101;
   contrl[1] = 0;
   contrl[3] = 0;
   contrl[5] = 1;
   contrl[6] = handle;
   vdi( &pb );
}
Beispiel #5
0
void vr_recfl(int16_t handle, int16_t *pxyarray)
{
   memcpy(vdi_ptsin, pxyarray, sizeof(int16_t) * 4);
   vdi_control[0] = 114;
   vdi_control[1] = 2;
   vdi_control[3] = 0;
   vdi_control[6] = handle;

   vdi();
}
Beispiel #6
0
// Get fill attributes
void vqf_attributes(int16_t handle, int16_t *attrib)
{
    vdi_control[0] = 37;
    vdi_control[1] = 0;
    vdi_control[3] = 0;
    vdi_control[6] = handle;

    vdi();

    memcpy(attrib, vdi_intout, sizeof(int16_t) * 5);
}
Beispiel #7
0
// Set clipping rectangle
void vs_clip(int16_t handle, int16_t clip_flag, int16_t *pxyarray)
{
    vdi_intin[0] = clip_flag;
    memcpy(vdi_ptsin, pxyarray, sizeof(int16_t) * 4);

    vdi_control[0] = 129;
    vdi_control[1] = 2;
    vdi_control[3] = 1;
    vdi_control[6] = handle;

    vdi();
}
Beispiel #8
0
int16_t vsf_interior(int16_t handle, int16_t style)
{
   vdi_intin[0] = style;

   vdi_control[0] = 23;
   vdi_control[1] = 0;
   vdi_control[3] = 1;
   vdi_control[6] = handle;

   vdi();

   return vdi_intout[0];
}
Beispiel #9
0
// Set fill colour
int16_t vsf_color(int16_t handle, int16_t color_index)
{
    vdi_intin[0] = color_index;

    vdi_control[0] = 25;
    vdi_control[1] = 0;
    vdi_control[3] = 1;
    vdi_control[6] = handle;

    vdi();

    return vdi_intout[0];
}
Beispiel #10
0
int16_t vswr_mode(int16_t handle, int16_t mode)
{
   vdi_intin[0] = mode;

   vdi_control[0] = 32;
   vdi_control[1] = 0;
   vdi_control[3] = 1;
   vdi_control[6] = handle;

   vdi();

   return vdi_intout[0];
}
Beispiel #11
0
int16_t vsf_perimeter(int16_t handle, int16_t per_vis)
{
   vdi_intin[0] = per_vis;

   vdi_control[0] = 104;
   vdi_control[1] = 0;
   vdi_control[3] = 1;
   vdi_control[6] = handle;

   vdi();

   return vdi_intout[0];
}
Beispiel #12
0
int16_t vsf_style(int16_t handle, int16_t style_index)
{
    vdi_intin[0] = style_index;

    vdi_control[0] = 24;
    vdi_control[1] = 0;
    vdi_control[3] = 1;
    vdi_control[6] = handle;

    vdi();

    return vdi_intout[0];
}
Beispiel #13
0
void vq_extnd (int16_t handle, int16_t owflag, int16_t *work_out)
{
	int_in[0] = owflag;

	vdi_control[0] = 102;
	vdi_control[1] = 0;
	vdi_control[3] = 1;
	vdi_control[6] = handle;

	vdi();

	memcpy(work_out, vdi_intout, 45);
	memcpy(work_out + 45, vdi_ptsout, 12);
}
Beispiel #14
0
void v_opnvwk (int16_t *work_in, int16_t *handle, int16_t *work_out)
{
	memcpy(vdi_intin, work_in, sizeof(int16_t) * 11);

	vdi_control[0] = 100;
	vdi_control[1] = 0;
	vdi_control[3] = 11;
	vdi_control[6] = *handle;

	vdi();
	
	*handle = vdi_control[6];
	memcpy(work_out, vdi_intout, 45);
	memcpy(work_out + 45, vdi_ptsout, 12);
}
Beispiel #15
0
/* VQ_SCRNINFO( 102, 1 )   */
void  vq_scrninfo( WORD handle, WORD *work_out )
{
   pb.intout = work_out;

   intin[0] = 2;
   contrl[0] = 102;
   contrl[1] = 0;
   contrl[3]  = 1;
   contrl[5] = 1;
   contrl[6] = handle;
   
   vdi( &pb );

   pb.intout = intout;
}
Beispiel #16
0
void v_ellipse (int16_t handle, int16_t x, int16_t y, int16_t xradius,
    int16_t yradius)
{
   vdi_ptsin[0] = x;
   vdi_ptsin[1] = y;
   vdi_ptsin[2] = xradius;
   vdi_ptsin[3] = yradius;

   vdi_control[0] = 11;
   vdi_control[1] = 2;
   vdi_control[3] = 0;
   vdi_control[5] = 5;
   vdi_control[6] = handle;

   vdi();
}
Beispiel #17
0
void v_circle(int16_t handle, int16_t x, int16_t y, int16_t radius)
{
   vdi_ptsin[0] = x;
   vdi_ptsin[1] = y;
   vdi_ptsin[2] = 0;
   vdi_ptsin[3] = 0;
   vdi_ptsin[4] = radius;
   vdi_ptsin[5] = 0;

   vdi_control[0] = 11;
   vdi_control[1] = 3;
   vdi_control[3] = 0;
   vdi_control[5] = 4;
   vdi_control[6] = handle;

   vdi();
}
Beispiel #18
0
WORD	vqt_xfntinfo( WORD handle, WORD flags, WORD id, WORD index, XFNT_INFO *info )
{
	info->size = (LONG) sizeof( XFNT_INFO );

	intin[0] = flags;
	intin[1] = id;
	intin[2] = index;
	*(XFNT_INFO **)&intin[3] = info;

	contrl[0] = 229;
	contrl[1] = 0;
	contrl[3] = 5;
	contrl[5] = 0;
	contrl[6] = handle;

	vdi( &pb );

	return( intout[1] );
}
Beispiel #19
0
/* OPEN BITMAP (VDI 100, 1) */
void  v_opnbm( WORD *work_in, MFDB *bitmap, WORD *handle, WORD *work_out )
{
   pb.intin = work_in;
   pb.intout = work_out;
   pb.ptsout = work_out + 45;

   contrl[0] = 100;
   contrl[1] = 0;
   contrl[3] = 20;
   contrl[5] = 1;
	contrl[6] = *handle;
   *((ULONG *)(&contrl[7])) = (ULONG) bitmap;

   vdi( &pb );

   *handle = contrl[6];
   pb.intin = intin;
   pb.intout = intout;
   pb.ptsout = ptsout;
}