From: Toby D. <tj...@sf...> - 2005-04-27 06:24:10
|
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? |
From: Alex T. <caf...@gm...> - 2005-04-30 03:10:50
|
Hi all, Didn't bother touching the mouse code since I found that out.=20 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, >=20 > 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. >=20 > 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. >=20 > Toby >=20 > ---Alex's message copied from csjava developers forum > New concerns as my afternoon without World of Warcraft continues: >=20 > Since all the mouse functions are done using internal coordinates in the > parent class, I opted to convert them to "fake" coordinates for now. Howe= ver > there is something that confuses me: >=20 > Currently in mouseClicked, there is a line: > <b> _currentPoint =3D null;</b> >=20 > 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 _currentPoin= t > but sets it to null at the end. What exactly is this supposed to be doing= ? >=20 > |
From: Toby D. <tj...@sf...> - 2005-04-30 03:48:31
|
Alex, I've moved your package from demo to developer. It seems to be a better way to organize things. I'll look at your code a little later. 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 > > |
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 > > |
From: Alex T. <caf...@gm...> - 2005-04-30 10:38:07
|
Well, the naming is not a big issue - it's just some refactoring if anything. I think I had some comment in there about getRealX really needing a new name, or something. Did not know about the Graphics2D part, I'll look into that sometime.=20 Although, I think if that is used instead, it might behave differently than the way it is right now. It also seems that the translate function deals with this relative to the previous origin, which might be a problem since our origin setting is always relative to the actual device space coordinates. (Horray for new vocabulary) Of course, this conclusion is the result of 30 seconds of reading the Javadoc for Graphics2D after excessive amounts of World of Warcraft, so I will look into it more thoroughly tomorrow. -Alex On 4/29/05, Toby Donaldson <tj...@sf...> wrote: > Alex, looking at your code I was confused by your use of the world "real" > --- I thought it meant real numbers. :-) >=20 > 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. >=20 > So I think terminology should be used in the variable and method names. >=20 > Also, I wonder if there is perhaps a simple trick for getting this to wor= k? > In TheMatrix.paint, g2.translate and g2.scale are used. Could those (or > similar) methods be used to set the origin properly? >=20 > Toby >=20 > On 4/29/05 8:10 PM, "Alex Tsai" <caf...@gm...> wrote: >=20 > > 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 mi= ght 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 so= me > >> 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 t= he > >> parent class, I opted to convert them to "fake" coordinates for now. H= owever > >> there is something that confuses me: > >> > >> Currently in mouseClicked, there is a line: > >> <b> _currentPoint =3D null;</b> > >> > >> But this is really weird to me, since _currentPoint is only declared i= n > >> TheMatrix, and it's only actually used in mouseClicked and mouseDragge= d. > >> However, in mouseClicked I don't think it does anything with _currentP= oint > >> but sets it to null at the end. What exactly is this supposed to be do= ing? > >> > >> > > > > > > ------------------------------------------------------- > > 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 > > > > >=20 > ------------------------------------------------------- > 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=3D20 > _______________________________________________ > csjava-developer mailing list > csj...@li... > https://lists.sourceforge.net/lists/listinfo/csjava-developer > |