From: Alan W. I. <ir...@be...> - 2002-02-28 19:31:54
|
Thanks, Maurice, for your comment below which inspired me to look further at the code and documentation. As my previous posts have shown, I was confused about the differences between (sub-)pages, viewports, and windows. But now I have looked again at the advanced section of the documentation, and it is all clearly layed out there. Each (sub-)page can have more than one (possibly overlapping) viewport, and each viewport can have various windows superimposed by repeated calls to plwind (with data registered for each plwind call with plP_swin). The windows for a given viewport only differ in the world coordinates of their minimum and maximum x and y values so multiple windows allow you the option of making single viewport plots with multiple sets of world coordinates. If you do have multiple sets of world coordinates for a single viewport, the data for each plwind call are registered with plP_swin with an ascending windows index. Note that in normal use there is only one window per viewport and the viewports don't physically overlap. But in the most general case we have overlapping viewports with multiple windows each. Note in c_plcalc_world I continue to use Paul Casteel's trick of searching backwards through the windows indices. Thus, the code finds the last possibly overlapping defined viewport and last window defined for that viewport that contains the relative device coordinates. This completely answers my concern (Maurice answered it as well) over what happens with multiple viewports per sub-page. However, the windows (incorrectly named subpage) index currently returned is something with a very special internal meaning. Now that I understand this index, I don't see much public use for it. Does Joao need this index just for extra information for human consumption? It won't make much sense unless you repeat all the ifs, ands, and buts from above in the documentation. Alternatively, if it is meant to be used to index some information from plplot, I am not aware of any public (much less common) API that uses this index. I am now leaning toward changing c_plcalc_world to just return a status in the argument list and drop the idea of returning the windows index altogether. That's what I will probably do unless I hear some good arguments to keep it (especially from Joao since he probably had some specific use in mind when he originally brought up the possibility of returning this index). 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 Thu, 28 Feb 2002, Maurice LeBrun wrote: > I looked at the dox & code, and all looks cool. > > My only nit is that the references to "subpage" should be replaced by > "window". I like the more general term better since the code should work fine > even if not using the usual PLplot subpage model. In fact I originally wrote > the window registration code with a completely different windowing front-end > in mind. > > -- > Maurice LeBrun mj...@ga... > > _______________________________________________ > Plplot-devel mailing list > Plp...@li... > https://lists.sourceforge.net/lists/listinfo/plplot-devel > |