Hamish wrote: > > 7.0 doesn't have D_get_screen_window(); D_setup() uses R_get_window() > > instead (R_get_window() reports the raster clip region, which is > > initially set from $GRASS_FRAME). > > note what we are after for the d.info -g flag is the *unclipped* geographic > region. > as you say, we already have g.region -g for the clipped version.
I know. The point is that you need the geographic coordinates which correspond to some particular set of screen coordinates. If you're writing a script which needs to perform its own translation from display coordinates to geographic coordinates, you need two pieces of information: a rectangle in display coordinates, and the matching rectangle in geographic coordinates. In many cases, it doesn't particularly matter which display rectangle you pick, whether it's the full screen, or the active frame, or the portion of the active frame to which the region is mapped (i.e. the active frame excluding the "margins"), so long as you use the same rectangle for both display and region coordinates. If you need the active frame, R_get_window() will provide this information. That reports the low-level clip window; nothing will be drawn outside of that rectangle. OTOH, the D_get_d_* functions report the portion to which the current region is mapped, excluding any margins. Rasters will never be drawn outside of that region. Vectors might be drawn outside of that region, depending upon whether display-level clipping or culling is enabled. Also, note that mapping the display frame to geographic coordinates may produce an invalid region, as the north/south boundaries may exceed 90 degrees. -- Glynn Clements <[EMAIL PROTECTED]> _______________________________________________ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user