Ultrix-3.1/src/libplot/tla100/open.c

/*
 * SCCSID: @(#)open.c	3.0	4/22/86
 */

/**********************************************************************
 *   Copyright (c) Digital Equipment Corporation 1984, 1985, 1986.    *
 *   All Rights Reserved. 					      *
 *   Reference "/usr/src/COPYRIGHT" for applicable restrictions.      *
 **********************************************************************/

/*

 Facility:	Part of the plot package for the LA100 printer

 Called by:	driver()

 Calls: 	nothing

 Abstract:	open - open the LA100 printer for graphics output

    The open function is responsible for initlizing the variables
    for the LA100 Plot package and for sending the escape sequence
    to put the printer in graphics mode.

 Author:	Kevin J. Dunlap

 Creation:	March 1984

*/

#include	"la100.h"


int xnow,ynow;			/* the x and y coordinates of the */

int currx, curry;
int dminx=9999, dminy=9999, dmaxx=0, dmaxy=0;
int x0=0;
int y0=MAXY-1; 


char bits[] = { 
	1, 2, 4, 8, 16, 32 } 
;/* Bits we turn on when setting sixels */


float boty;		/* the device coordinate of the bottom y */
float botx;		/* the device coordinate of the bottom x */
float obotx;		/* the x and y coordinates of the bottom */
float oboty;		/* left corner of the plotting area */
float scalex;		/* the scaling factor for x coordinates */
float scaley;		/* the scaling factor for y coordinates */

openpl()
{
	int tmpx, tmpy;

	boty =  0.;
	botx =  0.;
	obotx = 0.;
	oboty = 0.;
	scalex = 1.;
	scaley = 1.;
	printf("\33[5i");		/* turn on printer */
	printf("\33P0q");		/* turn on graphics mode on LA100 */
	for(tmpx=0; tmpx < MAXX; tmpx++) {
		for(tmpy=0; tmpy < MAXY/6; tmpy++) 
			bitmap[tmpx][tmpy] =0;
	}
}