Thread View: comp.sys.amiga.tech
3 messages
3 total messages
Started by Brett Coon
Mon, 07 Jan 1991 22:53
Who frees CUSTOMBITMAPs?
Author: Brett Coon
Date: Mon, 07 Jan 1991 22:53
Date: Mon, 07 Jan 1991 22:53
24 lines
1599 bytes
1599 bytes
When you open a screen with the CUSTOMBITMAP flag set in the NewScreen struc- ture, will CloseScreen free the bitmap memory? If so, how can I prevent this from happenning so that I can free the memory myself at a later time? On a related topic, is it correct that memory must be freed in the same block sizes in which it is allocated? I.E. if I use AllocRaster to allocate a 640x200 bitmap, I can't free it as two 320x200 bitmaps, right? Finally, if I want to open a 320x200 pixel screen that shows 1/2 of a 640x200 pixel bitmap, is it correct that I should specify 320x200 in the NewScreen structure but 640x200 in my (custom) BitMap structure? I tried specifying 640x200 in both (but not setting the HIRES flag in NewScreen), and it appears to have opened an overscan screen, which is not what I want. I'd prefer not to play with the RasInfo and related structures any more than I have to, so I'm looking for a combination of settings that will open the appropriate screen directly. Thanks, -brett -- |Brett Coon | uunet!smosjc!brett | |S-MOS Systems, Inc. | "Very exciting... as a luggage problem." | |San Jose, CA | -Joe Vs. The Volcano |
Re: Who frees CUSTOMBITMAPs?
Author: Peter da Silva
Date: Tue, 08 Jan 1991 13:47
Date: Tue, 08 Jan 1991 13:47
13 lines
1016 bytes
1016 bytes
In article <324@smosjc.UUCP> brett@smosjc.UUCP (Brett Coon) writes: > When you open a screen with the CUSTOMBITMAP flag set in the NewScreen struc- > ture, will CloseScreen free the bitmap memory? No. > On a related topic, is it correct that memory must be freed in the same block > sizes in which it is allocated? In a manner of speaking: you must free the same requests that were made. -- Peter da Silva. `-_-' <peter@sugar.hackercorp.com>.
Re: Who frees CUSTOMBITMAPs?
Author: markv
Date: Tue, 08 Jan 1991 17:25
Date: Tue, 08 Jan 1991 17:25
39 lines
2573 bytes
2573 bytes
In article <324@smosjc.UUCP>, brett@smosjc.UUCP (Brett Coon) writes: > When you open a screen with the CUSTOMBITMAP flag set in the NewScreen struc- > ture, will CloseScreen free the bitmap memory? If so, how can I prevent this > from happenning so that I can free the memory myself at a later time? No, Intuition does NOT free memory on a CUSTOMBITMAP screen, its up to you. That includes both the Bitmap struct and the actual raster. > On a related topic, is it correct that memory must be freed in the same block > sizes in which it is allocated? I.E. if I use AllocRaster to allocate a > 640x200 bitmap, I can't free it as two 320x200 bitmaps, right? To be on the safe side in all cases the answer is yes. The reason is to insure future compatibilty with new or replacement functions that might want to do resource tracking, etc. > Finally, if I want to open a 320x200 pixel screen that shows 1/2 of a 640x200 > pixel bitmap, is it correct that I should specify 320x200 in the NewScreen > structure but 640x200 in my (custom) BitMap structure? You can not do this at the SCREEN level. When you set the resolution on the NewScreen structure, you are setting the HARDWARE resolution. The bitmap for the screen must be equal in size to the screen. The system is trying to fit your 640 pixels on the display in LORES via overscan. The better way to do this is open a conventional screen, then open a SuperBitMap window. If it's a borderless backdrop window, the visual effect will be the same, but you'll have the advantage of a window for its IDCMP, and you can easily scroll the bitmap with ScrollVPort(). -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Mark Gooderum Only... \ Good Cheer !!! Academic Computing Services /// \___________________________ University of Kansas /// /| __ _ Bix: markgood \\\ /// /__| |\/| | | _ /_\ makes it Bitnet: MARKV@UKANVAX \/\/ / | | | | |__| / \ possible... Internet: markv@kuhub.cc.ukans.edu ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads