[comp.sys.amiga] Super-Bitmap Problem

uzun@wolf.UUCP (Roger Uzun) (01/13/88)

I am trying to opena super bitmap window on the WorkBench and all
is fine except that the backgroud is all garbaged up, that is it is
not one solid background color like Blue in the case of my workbench.
I set up the Window to be a max 640 X 200 pixels and open it like so:

InitBitMap(&TheBitMap,2,640,200);
TheBitMap.Planes[0] = AllocRaster(640,200);
TheBitMap.Planes[1] = AllocRaster(640,200);
w = OpenWindow(&MyWindow);

....etc

I left out the error checking that I do.  Anyways it opens up fine and
I can draw to it ok but its background is full of noise.  
Am I missing something to init the BitPlanes to 0?
I thought AllocRaster would do that for me.  

Also when I do a CloseWindow(w) Will that deallocate the AllocRaster
Memory or should I also do a FreeRaster.  

Thanks

-Roger

carolyn@cbmvax.UUCP (Carolyn Scheppner CATS) (01/15/88)

In article <615@wolf.UUCP> uzun@wolf.UUCP (Roger Uzun) writes:
>I am trying to opena super bitmap window on the WorkBench and all
>is fine except that the backgroud is all garbaged up, that is it is
>not one solid background color like Blue in the case of my workbench.
>I set up the Window to be a max 640 X 200 pixels and open it like so:
>
>InitBitMap(&TheBitMap,2,640,200);
>TheBitMap.Planes[0] = AllocRaster(640,200);
>TheBitMap.Planes[1] = AllocRaster(640,200);
>w = OpenWindow(&MyWindow);
>


AllocRaster() doesn't clear.  Use something like BltClear() to clear.
Make sure you store ptr to BitMap structure in your NewWindow structure
You must deallocate your structures and planes

See Super.c on Fish Disk #28 for full example Super.c.
Or it may be posted in comp.sources.amiga
-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Carolyn Scheppner -- CATS   >>Commodore Amiga Technical Support<<
                     UUCP  ...{allegra,ihnp4,rutgers}!cbmvax!carolyn 
                     PHONE 215-431-9180
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=