From: Toby D. <tj...@sf...> - 2005-04-30 04:10:24
|
Alex, looking at your code I was confused by your use of the world "real" --- I thought it meant real numbers. :-) Someone correct me if I'm wrong (I don't know much about graphics), but "user space" and "device space" are the terms more commonly used to refer to the different types of coordinate systems. TheMatrix currently uses the device space coordinates (top left is (0, 0), y increases downwards) for the user space. TheMatrixOrigin uses Cartesian coordinates as the user space. So I think terminology should be used in the variable and method names. Also, I wonder if there is perhaps a simple trick for getting this to work? In TheMatrix.paint, g2.translate and g2.scale are used. Could those (or similar) methods be used to set the origin properly? Toby On 4/29/05 8:10 PM, "Alex Tsai" <caf...@gm...> wrote: > Hi all, > > Didn't bother touching the mouse code since I found that out. > However, I "updated" TheMatrixOrigin with a constructor > TheMatrixOrigin(int width, int height) which just calls super(width, > height) so my demo works properly. I should really add the other ones. > :/I also wrote LameLineGrapher (found in my demo folder - it is fairly > lame) as a demo of TheMatrixOrigin and how to use it. It is fairly > straight forward, just that code needs to be written to check that > you're not making anything go out of bounds. > > -Alex > > On 4/26/05, Toby Donaldson <tj...@sf...> wrote: >> Alex, >> >> I don't know if the mouse code in TheMatrix has been kept up ... It might do >> nothing! The simplest thing is to ignore it or delete it for now. >> >> By the way, can you post some sample code using TheMatrixOrigin for some >> basic task so that others can see how it is meant to be used. >> >> Toby >> >> ---Alex's message copied from csjava developers forum >> New concerns as my afternoon without World of Warcraft continues: >> >> Since all the mouse functions are done using internal coordinates in the >> parent class, I opted to convert them to "fake" coordinates for now. However >> there is something that confuses me: >> >> Currently in mouseClicked, there is a line: >> <b> _currentPoint = null;</b> >> >> But this is really weird to me, since _currentPoint is only declared in >> TheMatrix, and it's only actually used in mouseClicked and mouseDragged. >> However, in mouseClicked I don't think it does anything with _currentPoint >> but sets it to null at the end. What exactly is this supposed to be doing? >> >> > > > ------------------------------------------------------- > This SF.Net email is sponsored by: NEC IT Guy Games. > Get your fingers limbered up and give it your best shot. 4 great events, 4 > opportunities to win big! Highest score wins.NEC IT Guy Games. Play to > win an NEC 61 plasma display. Visit http://www.necitguy.com/?r > _______________________________________________ > csjava-developer mailing list > csj...@li... > https://lists.sourceforge.net/lists/listinfo/csjava-developer > > |