From: Paul Harness Subject: Re: Blit region with GRX ? To: flaregun AT strauss DOT udel DOT edu (Edwin L Phillips Jr) Date: Wed, 2 Mar 1994 10:18:59 +0000 (GMT) Cc: djgpp AT sun DOT soe DOT clarkson DOT edu (djgpp) > > What I do is: > > GrContext *gc; > gc = GrCreateContext(...); /* This can be any size... 1000x1000 etc. */ > > GrSetContext(gc); /* This is the trick */ > > ... draw to gc ... > > GrSetContext(NULL); /* Go back to the screen context */ > > GrBitBlt(gc, 100, 100, 300, 300, NULL, 0, 0); /* parms may be out of order */ > ^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^ > src context region dest region (screen) > (100,100)<=>(300,300) (0,0) > > This is convenient for when you want to make a huge picture, and display > part of it on the screen (or in a window). Just bitblt the region you > want to see into the window. > > Ed > Thanks :-)) My mistake was to use GrCreateSubContext() rather than GrCreateContext(). -- Paul Harness, | Internet: gapa83 AT udcf DOT gla DOT ac DOT uk Department of Physics and Astronomy, | University of Glasgow, | Tel +44-41-339-8855 ext 8359 Glasgow, G12 8QQ, SCOTLAND. | Fax +44-41-334-9029