Forum unknown
· Programming
#AreaFill
7 messages in this thread
Help! Help! I'm trying to use the AreaMove, AreaDraw, AreaFill stuff as
described in the ROM KERNAL MANUAL using Aztec C with 512K.
Everything goes well 'til I close my window.
The RKM says to FreeRaster so I have this as the first line of my clean-up
routine:
FreeRaster(myplane,320L,200L);
(where previously I have: PLANEPTR myplane; myplane = AllocRaster(320L,200L);
When the Amiga hits that line (FreeRaster) the GURU comes a' callin'. (at
least I think that's the culprit).
Can anyone please help me out of my stupidity attack here???
Thanks in advance… John
John;
Try freeing the plane before you close the window. I can't be sure without
seeing the actual code, but if the plane is a tmpras attached to the window,
you may be losing the pointer to it when you close the window. Ray
Ray,
Thanks for your response…
I am trying to FreeRaster() before I close ANYTHING else down.
It's the last thing I'm "opening" and so it's the first thing I try to close.
Any other suggestions???
John
O.K., I've found that sometimes adding a little extra space in the
AllocRaster call, and in the FreeRaster call works. I've used
AllocRaster(width+24L,height+24L); and
FreeRaster(PTR,width+24L,height+24L); I'm not really sure WHY, but this
worked for me. I suspect it provides some padding. I borrowed the idea
from some of -=RJM=-'s code.
O.K., I've found that sometimes adding a little extra space in the
AllocRaster call, and in the FreeRaster call works. I've used
AllocRaster(width+24L,height+24L); and
FreeRaster(PTR,width+24L,height+24L); I'm not really sure WHY, but this
worked for me. I suspect it provides some padding. I borrowed the idea
from some of -=RJM=-'s code.
Ray,
Thanks for your response…
I am trying to FreeRaster() before I close ANYTHING else down.
It's the last thing I'm "opening" and so it's the first thing I try to close.
Any other suggestions???
John
John;
Try freeing the plane before you close the window. I can't be sure without
seeing the actual code, but if the plane is a tmpras attached to the window,
you may be losing the pointer to it when you close the window. Ray