Date: Wed, 17 Sep 1997 19:53:29 -0500 (CDT) From: Andrew Deren To: "Gautam N. Lad" cc: djgpp AT delorie DOT com Subject: Re: BITMAP in Allegro In-Reply-To: <5vfeda$fa9$1@news.interlog.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Sun, 14 Sep 1997, Gautam N. Lad wrote: > Hi, > I don't know if this is already in Allegro's DOC, but here goes. > I want to write something onto 'screen', but before I do, I want to > save the portion of the screen that will be overwritten. > What I mean is, I've created my own GUI routines, and when a dialog box is > activated, I want to save only the area of the screen the dialog covers. Once the > dialog box goes away, I want to put the original portion back. > > How do I do this, without getting the entire screen, and doing a double buffer. > I only want to do a portion double buffer. Does this have anything to do with > sub bitmaps? Just create a bitmap and blit into it, here is a short example: let w and h be dimensions of the dialog and x and y the location of it temp_bmp = create_bitmap(w, h); blit(screen, temp_bmp, x, y, 0, 0, w, h); do the dialog blit(temp_bmp, screen, 0, 0, x, y, w, h); destroy_bitmap(temp_bmp); I think you are going to have to add 1 or subtract one somewhere, but don't remember where and whether you do have to. > > Any suggestions!?!? > Bye! > > **************************************************** > * Gautam N. Lad * > *--------------------------------------------------* > * * > * E-Mail : gautam AT interlog DOT com * > * Website : http://www.interlog.com/~gautam * > * * > * OS/2, DOS/Windows, Graphics Gallery, Software, * > * Links, Rayzor Editor/2, POV-Ray, TexturEyes, * > * POV-PAK and lots lots lots more!!!!!!! * > **************************************************** > ,,, (0 0) +-------------oOO----(_)-------------------+ | Andrew Deren | | aderen AT eecs DOT uic DOT edu | | www.eecs.uic.edu/~aderen/ader/main.html | +-------------------------oOO--------------+ || || ooO Ooo