[comp.sys.mac.programmer] MultiFinder and Bitmap problems.

mcli@joker (Maurice Ling) (08/15/89)

Hello All,

I'm writing a program in THINK's C 3.0 to plot 128x128 images using a pixel
map.  The problem I'm running into is that it works correctly under
Finder, but I get an image array of 0's in MultiFinder.  However, if I 
step through the program in MultiFinder, It works right.  Is there something
special to consider for MultiFinder?  Here is a segment of the program:

----------------------------------------------------------------------------

	struct	xyvalues {
		float x;
		float y;
		} ;
	typedef struct xyvalues DSTRUCT;

	DSTRUCT *ArrayPtr;
	char	*ximage;

	CalcFunction()
	{
		....
		Scaleximage(ArrayPtr, ximage);
		....
	}

	Scaleximage(Array, image)
		DSTRUCT *Array;
		char	*image;
	{
	....
		for (i = 1; i < NUM ; i++)
			image[i] = (int)((Array[i] - min )*scale); 
	....
	}
--------------------------------------------------------------------------

Another problem I'm running into is after I get the image copied onto the
screen, the image gets messed up sometimes when I select DA's and activate
other windows.  I have it so that it updates the appropriate window by bit
copying the bits from the offscreen pixel map.  However, it seems that the
pixel map itself is moved or changed.  Is there an effective way to prevent
this?

Thanks for the help!

Maurice

* ** * ** * ** * ** * ** * ** * ** * ** * ** * ** * ** * ** * ** * ** * **
BITNET  :  MCLI_SS@UORDBV                       \/
UUCP    :  ...rochester!uhura!mcli             >--< ======================
Internet:  mcli@joker.optics.rochester.edu      /\