From: Hartmut Schirmer Newsgroups: comp.os.msdos.djgpp Subject: Re: Grx22:where to find code Date: Thu, 08 Jan 1998 16:38:37 +0100 Organization: Technische Fakultaet, University of Kiel, Germany Lines: 49 Message-ID: <34B4F2FD.5957@techfak.uni-kiel.de> References: <199801012212 DOT RAA12940 AT delorie DOT com> <969_9801081947 AT softtech DOT st DOT net DOT au> NNTP-Posting-Host: zora.techfak.uni-kiel.de Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Gary wrote: > > Once again I.m here to pick someones brain,I need to know how the user > functions are used within the grx22 graphics library,if someone could point me > to a place where there is some documentation or code written for this I would > be eternally grateful. Have a look at the doc subdir in contrib/grx, there's API.DOC from grx v1.03 This documentation is general still valid for grx v2 but in case of trouble you should also check at least grx20.h for correct definition! AFAIK, currently no one works on new up to date doc's for GRX :( > OK,I have been able to access these functions and use them,but what i would > like to know if graphics drawn on the user screen can be transferred,blitted to > a (context,subcontext)?,I have looked through the source code of the library > and have not seen anything there that does that,however that dos'nt mean its > not there. Well, char *memory[4]; int ps = GrPlaneSize(w,h); /* width and height of your sub context */ int np = GrNumPlanes(); int i; GrContext *gc; /* allocate bitmap memory */ for (i=0; i < np; ++i) { memory[i] = malloc(ps); assert(malloc!=NULL); } while (i<4) memory[i++] = NULL; GrCreateContext(w,h,memory,gc); /* build the context in memory */ GrBitBlit(gc, 0, 0, /* destination : memory context */ NULL, left, top, left+w-1, top+h-1, /* source: screen */ GrWRITE /* copy, no operator applied */ ); I did this example from memory and didn't compile and run it. So take some care ... Hartmut -- Hartmut Schirmer | Phone: +49-431-77572-709 FAX:-703 Automatisierungs- & Regelungstech. | hsc AT techfak DOT uni-kiel DOT de Technische Fakult"at, | http://www.techfak.uni-kiel.de/~hsc Kaiserstr. 2, 24143 Kiel, Germany | PGP key via WWW, Key ID:6D84AEC1