So I've been playing around with this for a couple of days. What I have now, which works, but is not practical, is a underlying grid that is transformed when the user zooms in and out. The objects move just fine on the screen. No problem.
The problem is that when the user zooms in/out, I have it so the grid does a new transformation of itself so it is correct according to the zoom. If the grid is big, say, 400 x 400, it freezes for a second and this is unacceptable.
My next solution is to somehow calculate where my mouse pointer clicked based on what the transformation is at the moment. Basically, I want to dynamically generate the location of the grid where I am (without actually having a grid). Then I can put this into a list that the program can move the object too. Let me see if I can explain it a bit better, I tried to program it, but I have failed miserably.
Grid width and height at normal view: 20,20. The user zooms out. So then the user clicks in the right hand corner. Let's say, this represents grid location 4000,4000, but on the user screen the actual coordinate is say 800x600. It needs to somehow get to 4000,4000 from 800x600 based on the current size of the grid's elements (which may be (x,y,2,2) at this point). When the user zooms all the way in, and clicks in the corner once more, the grid element would in fact be: 800,600,20,20. The only way I can get a coordinate larger then my screen resolution is if I actually draw the grid and do the transformations on it.
Ok, I don't think I explained it well enough so feel free to ask any questions. Right now I do not have any useful code to post because I haven't got anywhere productive besides with the inefficient grid.
[Though I did just think of this. If I do a transformation of 1 item on the underlying grid to see how much it changed, ie: it was (10,10,20,20) and then went down to (5,5,10,10). I can then loop through the rest of them and just apply the new change without having to do n transformations. However, I am not sure how exactly the transform works code wise. I also thought of putting the transformation on its own thread that is always created so I can just pass it the transformation to do but I don't think that'd work too well.]
Ok, its late, I've been working on this for 5 hours and its time for bed and that means I tend to ramble.
Here's a little picture of my problem:www.tempestseason.net/images/transform.JPG
I'll try to post the code that I have with that tomorrow, but it uses a bunch of custom stuff so I'll have to rewrite it.
Thanks for any help.