I have been working on and off on this graphical editor, and i seem to come
across a recurring problem that my initial ideas for the program design weren’t
sound, and i have to go back one or two things. This affects the rest of the
system and forces me to modify a lot other functions. One
I wish to draw onto a canvas, select certain objects using a (repaint
the selected objects red) self-implemented select method, and delete
them (undo if done wrongly) with, small misc. features like zooming in
and out, dragging the canvas to view different areas. I've gotten so
far as mimicking a
I think you have some of the right ideas.
Two additional ideas to consider...
* Usually you will have some data representation of objects that will be
drawn and manipulated. This might be as simple as a list of structs or
Racket objects, and (in an OOPL way). If you're making a simple
I'm not seeing laggy behavior when I run your code, but I do see that
you're refreshing the entire window on each mouse movement event.
Probably you want to make sure that the event isn't a movement even
before calling refresh-now. Also, you might want to call refresh
instead of refresh-now.