[GRASS-dev] display text in wxNviz

Michael Barton Michael.Barton at asu.edu
Sat Jul 9 11:14:38 EDT 2011


Anna,

Perhaps the solution is not to do the text in the OpenGL canvas. The idea of putting Nviz display into the 2D canvas was to give it access to all the tools of the 2D canvas--zooming, panning, display export, legend/scalebar.

Use the existing d.legend tool to display a legend in a 2D layer over the 3D. No need for it to have perspective.

Use the scalebar tool to add a scalebar (withou N arrow). It should be horizontal anyway and should not have perspective so that it is easier to read. Just make its length tied to the place on the OpenGL image so that if you put it in the 'distance' it will be smaller than if it is in the 'foreground'.

It would be really nice if the other tools worked too: zooming and panning, profiles and measurement. But perhaps that is another project.

Michael
____________________
C. Michael Barton
Director, Center for Social Dynamics & Complexity 
Professor of Anthropology, School of Human Evolution & Social Change
Arizona State University

voice: 	480-965-6262 (SHESC), 480-727-9746 (CSDC)
fax:          480-965-7671 (SHESC),  480-727-0709 (CSDC)
www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu











On Jul 9, 2011, at 9:00 AM, <grass-dev-request at lists.osgeo.org> <grass-dev-request at lists.osgeo.org> wrote:

> Date: Fri, 08 Jul 2011 18:54:47 +0200 (CEST)
> From: Anna Kratochv?lov? <KratochAnna at seznam.cz>
> Subject: [GRASS-dev] display text in wxNviz
> To: Maris Nartiss<maris.gis at gmail.com>
> Cc: Helena Mitasova<hmitaso at unity.ncsu.edu>,Martin
> 	Landa<landa.martin at gmail.com>,GRASS developers
> 	list<grass-dev at lists.osgeo.org>
> Message-ID: <9477.3102.5884-27266-66491474-1310144087 at seznam.cz>
> Content-Type: text/plain;	charset="iso-8859-2"
> 
> Hello,
> 
> I recently implemented the north arrow in WxNviz but I have problems with displaying text. You seem to have some experience so I wonder if you could help me.  The problem is in the fontbase variable which is needed but I really don't understand what it is and how could I get it. It is calculated in [0] in Togl_LoadBitmapFont function. The north arrow can stay without text but scalebar and legend not, so I need some solution.
> 
> Thanks for any help.
> 
> Anna
> 
> 
> [0] http://trac.osgeo.org/grass/browser/grass/trunk/visualization/nviz/src/togl.c



More information about the grass-dev mailing list