[GRASS5] embedding GRASS display into my app
David Piasecki
piasecda at nv.doe.gov
Wed Apr 7 17:53:30 EDT 2004
This seems to be working pretty well! Thanks! It only takes 2-3 seconds
for the map to render itself in GRASS and save as a PNG file, and then
a split second to load in my Cocoa-Java application :)
Now I'm starting to learn about how to execute GRASS commands from the
terminal window, and next from within Java. Then I just have to reload
the PNG base map any time I resize or rescale. I'm doubtful the
refreshing of icons will be fast enough if I want the user to be able
to move things around, but I guess that's getting fancy. In any case,
this should provide enough of a start. Thanks again!
David
On Apr 6, 2004, at 6:16 PM, Glynn Clements wrote:
>
> An alternative approach for a front-end would be to use the PNG driver
> for all graphical output, and have your program display the PNG
> images.
>
> This is likely to be somewhat tidier than either embedding the XDRIVER
> window (which is highly X-specific; this won't work with e.g. the
> "generic" Windows port), or trying to use the XDRIVER code (which uses
> the "raw" Xlib API).
>
> It is also more flexible. E.g. if you want to support "layers",
> rendering each layer as a separate PNG file then composing them in
> your program may be preferable to re-rendering the entire set whenever
> a layer is added, removed or changed.
>
> --
> Glynn Clements <glynn.clements at virgin.net>
More information about the grass-dev
mailing list