From: Alan W. I. <ir...@be...> - 2002-02-27 21:46:42
|
OK, I have just created c_plcalc_world, changed plTranslateCursor to call this function, tested the result using ./x01c -locate -dev xwin, and committed it. If you have any API concerns for c_plcalc_world now is the time to express them because I am going to docbook/document it shortly. As expected (since the code is meant to do the same thing) I found identical behaviour for both the old and new plplot library. However, that behaviour wasn't very good. ./x01c -locate -dev xwin works fine so long as your cursor is inside a viewport. However, outside a viewport the cursor just freezes. This bug makes some sense since there is no world coordinate information outside viewports. But I expect the xwin driver is simply ignoring the current 0 return code when no valid world coordinates can be found, and therefore getting into trouble. Can somebody find a quick fix to this driver behaviour? (I just verified this cursor freeze also shows up for tk and ntk.) Instead of the cursor freeze, you should get a message back that there are no world coordinates at the current position, and you should be able to move the cursor to new valid viewport locations. On second thought, is this a x01c.c problem? Geoffrey, could you please verify that c_plcalc_world and its parent plTranslateCursor always return valid world coordinates so long as the cursor is inside *some* viewport within some subpage? If it passes this test, I think I am done since nobody has spoken up about how we could identify the various viewports within a particular subpage. Alan email: ir...@be... phone: 250-727-2902 FAX: 250-721-7715 snail-mail: Dr. Alan W. Irwin Department of Physics and Astronomy, University of Victoria, P.O. Box 3055, Victoria, British Columbia, Canada, V8W 3P6 __________________________ Linux-powered astrophysics __________________________ On Wed, 27 Feb 2002, Alan W. Irwin wrote: > The new common API function c_plcalc_world (note the name change) can have > any API it likes since this is a new function. So the goal there is to be > the best possible API. Now my understanding is that common API functions > are all void, i.e., the only way they return status information is via the > argument list. For now I am going to return (via the argument list) a > window value starting at zero with a window value of -1 indicating failure > to find a valid window. I am no API expert so if that is the wrong way to > go from the best possible API point of view let me know, and I will change > it. But the API for this function is a completely separate issue from > the plTranslateCursor API. > > For now, I will leave the plTranslateCursor API strictly as is, but I > will change its internals to call c_plcalc_world. Once consensus has > been reached on changing the plTranslateCursor API, then all data > returned from c_plcalc_world will be available to plTranslateCursor > to facilitate that changed API. > > Alan > > email: ir...@be... > phone: 250-727-2902 FAX: 250-721-7715 > snail-mail: > Dr. Alan W. Irwin > Department of Physics and Astronomy, > University of Victoria, P.O. Box 3055, > Victoria, British Columbia, Canada, V8W 3P6 > __________________________ > > Linux-powered astrophysics > __________________________ |