Subject: RE: HW4 Additions

From: "Sam Berlin" <[email-masked]>
Date: Fri, 2 May 2003 14:37:43 -0400

Hi Professor,

There was a tiny bug with the repaint function.  It should correctly read:

    public void repaint() {
        shouldRepaint = true;
        if( isRepainting ) return;
        isRepainting = true;
        super.repaint();
        try {
            Thread.sleep(10);
        } catch(InterruptedException ignored) {}
        if(shouldRepaint) super.repaint();
        isRepainting = false;
	  shouldRepaint = false;
    }

I'm not sure threading is a problem in reading/writing the variables, but if
it is, then isRepainting & shouldRepaint should be declared volatile.

Thanks,
 Sam

-----Original Message-----
From: Sam Berlin [mailto:[email-masked]]
Sent: Friday, May 02, 2003 12:16 AM
To: Yap@Nyu. Edu
Subject: HW4 Additions

Hi Professor,

Attached is a modified version of MapDisplay in order to add the following:

	-- print function (output .fig format)
	-- when zooming, the image should not shift
	-- introduce slider for zooming
	-- introduce window resize
	-- avoid inefficient creating of image buffer every time we repaint
	-- get rid of flickering by overriding the repaint function

Let me know if there's anything else you'd like done, or if anything here
was not done appropriately.

Thanks very much for the chance to do this,
 Sam