GRASS GIS 7 Programmer's Manual  7.5.svn(2017)-r71817
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
gsd_label.c File Reference

OGSF library - label management (lower level functions) More...

#include <grass/gis.h>
#include <grass/glocale.h>
#include <grass/ogsf.h>
#include "rgbpack.h"
Include dependency graph for gsd_label.c:

Go to the source code of this file.

Macros

#define MAX_LIST   20
 

Functions

void gs_put_label (const char *text, GLuint fontbase, int size, unsigned long color, int *pt)
 Put label. More...
 
void gsd_remove_curr (void)
 Remove current label. More...
 
void gsd_remove_all (void)
 Remove all labels from display list. More...
 
void gsd_call_label (void)
 Call display list and draw defined labels – called from gsd_prim (gsd_call_lists) More...
 

Variables

GLuint label_base
 
GLuint label_id
 

Detailed Description

OGSF library - label management (lower level functions)

OGSF library - objects management (lower level functions)

GRASS OpenGL gsurf OGSF Library

(C) 1999-2008 by the GRASS Development Team

This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS for details.

Author
Bill Brown USACERL (1991-1992)
Doxygenized by Martin Landa <landa.martin gmail.com> (May 2008)

GRASS OpenGL gsurf OGSF Library

(C) 1999-2008 by the GRASS Development Team

This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS for details.

Author
Bill Brown USACERL (October 1993)
Doxygenized by Martin Landa <landa.martin gmail.com> (May 2008)

Definition in file gsd_label.c.

Macro Definition Documentation

#define MAX_LIST   20

Definition at line 25 of file gsd_label.c.

Referenced by gs_put_label(), gsd_call_label(), and gsd_remove_all().

Function Documentation

void gs_put_label ( const char *  text,
GLuint  fontbase,
int  size,
unsigned long  color,
int pt 
)

Put label.

Todo:
Allocate label dynamicaly
Parameters
fontbasefontbase settings
sizefont size
colorfont color
pt

Definition at line 41 of file gsd_label.c.

References _, b, do_label_display(), G_warning(), gsd_bgn_legend_viewport(), gsd_color_func(), gsd_end_legend_viewport(), gsd_get_txtwidth(), l, label_base, label_id, MAX_LIST, r, t, X, and Y.

void gsd_call_label ( void  )

Call display list and draw defined labels – called from gsd_prim (gsd_call_lists)

Definition at line 122 of file gsd_label.c.

References label_base, and MAX_LIST.

Referenced by gsd_calllists().

void gsd_remove_all ( void  )

Remove all labels from display list.

Definition at line 111 of file gsd_label.c.

References label_base, label_id, and MAX_LIST.

void gsd_remove_curr ( void  )

Remove current label.

Definition at line 97 of file gsd_label.c.

References label_id.

Variable Documentation

GLuint label_base

Definition at line 28 of file gsd_label.c.

Referenced by gs_put_label(), gsd_call_label(), and gsd_remove_all().

GLuint label_id

Definition at line 29 of file gsd_label.c.

Referenced by gs_put_label(), gsd_remove_all(), and gsd_remove_curr().