>I am developing an application where I would like to use real world
>coordinates (Latitude/Longitude in Dec.Deg.) instead of screen
>coordinates. However, I am having trouble figuring out how to do
>this using the Gpi function calls.
>In reading the online documentation I have found the description for
>GpiSetViewingLimits but I am not sure how to use it and it's related
>Perhaps somebody out there might be able to put me on the right path
>with a brief explanation (just a few lines or so) or by pointing out
>some examples that I might be able to download and study.
>Thanks in advance to those of you who can respond.
This may sound harsh but if you want to really get the most out of the
Gpi you need the technical library. It has an entire volumn devoted to it.
Having said that, here's a brief description.
The Gpi works in 4 coordinate spaces. These are:
World->Model->Presentation->Device (device doesn't really apply to windows)
You can define a transform to be used between each coordinate space.
When you draw, you actually draw into the world space. You can use what
ever coordinate ranges you like (independant of screen or printer etc.).
For specific types of units the Gpi supports metric, imperial and a couple of
others. You can then scale your own coordinate space into the model space
and then into presentation space.
It's all rather too complicated to describe in full, but the functions
to look at for the various transforms are:
GpiSetDefaultViewMatrix - for scaling model space into presentation space
GpiCallSegmentMatrix - for playing segments in world space in model space
Oh, yes - I am sort of assuming that you are using retained graphics. Otherwise
the DefaultView Matrix is only one a great interest.
p.s. An understanding of vector graphics doesn't go a miss either because the
manuals assume you understand matrix transformations and the link.
Richard Giles - VG Scientific (Fisons Plc)