[plt-scheme] using sgl in world.ss

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Tue Jan 30 17:54:13 EST 2007

At Tue, 30 Jan 2007 00:49:29 -0500, Chris Burke wrote:
> I'm attempting to turn world.ss into a 3D world rather than a 2D  
> world using sgl. [...]
> If using sgl to represent the world, would it make more sense for c  
> to be an instance of canvas (or instance of a class inheriting from  
> canvas) with overridden methods using the sgl library? I'm not  
> exactly sure why an editor-canvas is used but I've been able to get a  
> normal canvas instance to work with sgl in world. 

Yes, I think deriving from plain canvas% is right.

> Also, when I do  
> this, my canvas is shifted on the frame as seen here: http:// 
> www.ccs.neu.edu/~cburke/sgl.png. It has to do with the frame creation  
> and this specific line: (style '(no-resize-border metal)). How do I  
> compensate for that border and get the canvas in the correct place?

That's a bug in MrEd, which I'll fix. For now, I guess you'll have to
avoid 'metal.

Matthew



Posted on the users mailing list.