[comp.os.msdos.programmer] TC2.0 drawpoly

mazz@iti.org (Richard Mazzaferri) (05/31/91)

I'm developing an application which uses drawpoly() to put curves on screen.
I have one particular curve ( out of hundreds, so far ) which causes drawpoly()
to fail and graphresult returns -6, which is grNoScanMem - out of memory in 
scan fill.  I have no idea why this occurs and want to know how to prevent it,
as it's most disconcerting for the user to attempt to plot a curve, and have 
everything work except for the actual curve.
    The interesting thing is that requesting a plot on a slightly different
scale will result in everything working perfectly.  Anyone know what is going
on and how to fix it?  The poly[] itself only contains just over 600 points,
and many of the curves I plot ( successfully ) are longer.

    Mazz.

frank@cavebbs.gen.nz (Frank van der Hulst) (06/01/91)

In article <NV.675674038@venus.newcastle.edu.au> mazz@iti.org (Richard Mazzaferri) writes:
>I'm developing an application which uses drawpoly() to put curves on screen.
>I have one particular curve ( out of hundreds, so far ) which causes drawpoly()
>to fail and graphresult returns -6, which is grNoScanMem - out of memory in 
>scan fill.  I have no idea why this occurs and want to know how to prevent it,
>as it's most disconcerting for the user to attempt to plot a curve, and have 
>everything work except for the actual curve.

The TC GRAPHICS library includes a function called _graphsetbuff (or similar;
I don't have the manual or program in front of me right now). That specifies
how much memory to allocate for scratch-pad when initgraph is called. The
default is 4K, so try upping that to maybe 6K.


-- 

Take a walk on the wild side, and I don't mean the Milford Track.
Kayaking: The art of appearing to want to go where your boat is taking you.