Hi,
When I call this routine it works very slowly when filling small shapes and fails after filling about an eighth of the window when trying to flood the whole window. I must be doing something wrong but can't figure out what. I'm working in parForth and don't know C so let me explain what I'm doing in words. Thanks for helping me find out what I'm doing wrong.
1. There is a C-macro defined in gfx_h called RASSIZE which I wrote in parForth as:
(add 15 to width, arithmetic shift 3 right, bitwise AND with $FFFE) times height
2. I allocate space in the forth dictionary for a TmpRas structure called MyTmpRas.
3. I call AllocRaster with a window width x height of 960 x 540. This gives me a pointer I call RWorkspace.
4. I call InitTmpRas with parameters MyTmpRas, RWorkSpace,, 64800
5. I store MyTmpRas in the rastport rp_TmpRas field.
6. I set the APen with red ink
7. I call Flood with with the ptr to my rastport, mode 1, and Width/2, Height/2
The window slowly starts filling with red up from the center and then flood returns a zero (fail) after about an eight of the window is filled. If I flood a small shape it works okay but is very slow compared to paint programs and the like.
Any idea what I'm doing wrong? Thanks!!!
NathanH