Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!samsung!umich!ox.com!math.fu-berlin.de!unidui!unido!mcshh!abqhh!drdhh!bjoern From: bjoern@drdhh.hanse.de (Bjoern Kriews) Newsgroups: comp.sys.atari.st.tech Subject: Re: Printing GEM Graphics Message-ID: <2663.04.91@drdhh.hanse.de> Date: 11 Apr 91 17:52:44 GMT References: <63607@bbn.BBN.COM> Organization: Digital Island Lines: 42 From article <63607@bbn.BBN.COM>, by aking@bbn.com (Allen King): > > I've written a program which uses GEM windows, and I would like to > add printer capability to it. The simple thing of "print screen" lacks > the resolution I need. How do you change such a program to redirect > its output to the printer rather than the screen? Install GDOS & a printer driver, using device id 21 + fonts. Then the following piece of source should bring what you expect: int h,i; int in[11],out[57]; int p[10]; appl_init(); in[0]=21; /* DEVICE ID */ for(i=1;i<10;in[i++]=1); in[10]=0; /* NDC */ v_opnwk(in,&h,out); /* NOT VIRTUAL !!! */ if(!h) { printf("h: %d, couldn't open\n",h); appl_exit(); exit(1); } v_arc(h,5000,5000,2000,0,900); v_clswk(h); appl_exit(); exit(0); Hope that helps, Bjoern --- bjoern@drdhh.hanse.de = Bjoern Kriews / Stormsweg 6 / 2000 Hamburg 76 / FRG "gaaga mahwe Bjoern urgl ufzae Turbo-C bnub" (J. Willamowius)