GRASS 8 Programmer's Manual 8.6.0dev(2026)-745b61fbf6
Loading...
Searching...
No Matches
gsd_legend.c File Reference

OGSF library - legend creation. More...

#include <stdlib.h>
#include <grass/config.h>
#include <GL/gl.h>
#include <GL/glu.h>
#include <grass/gis.h>
#include <grass/raster.h>
#include <grass/glocale.h>
#include <grass/ogsf.h>
#include "rgbpack.h"
Include dependency graph for gsd_legend.c:

Go to the source code of this file.

Macros

#define MAX_LEGEND   256
 

Functions

void gsd_bgn_legend_viewport (GLint wl, GLint wb, GLint wr, GLint wt)
 ADD.
 
void gsd_end_legend_viewport (void)
 ADD.
 
int gsd_get_nice_range (float lownum, float highnum, int numvals, float *vals)
 ADD.
 
int gsd_make_nice_number (float *num)
 ADD.
 
GLuint gsd_put_legend (const char *name, GLuint fontbase, int size, int *flags, float *rangef, int *pt)
 Put legend.
 

Detailed Description

OGSF library - legend creation.

GRASS OpenGL gsurf OGSF Library

Converted code from legend.c in SG3d routines to set viewport, close viewport, and make legend

SPDX-FileCopyrightText: 1999-2008 GRASS Development Team SPDX-License-Identifier: GPL-2.0-or-later

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

Definition in file gsd_legend.c.

Macro Definition Documentation

◆ MAX_LEGEND

#define MAX_LEGEND   256

Definition at line 47 of file gsd_legend.c.

Function Documentation

◆ gsd_bgn_legend_viewport()

void gsd_bgn_legend_viewport ( GLint  wl,
GLint  wb,
GLint  wr,
GLint  wt 
)

ADD.

Parameters
wl
wb
wr
wt

Definition at line 57 of file gsd_legend.c.

References CM_COLOR, GS_ready_draw(), GS_set_draw(), gsd_colormode(), GSD_FRONT, gsd_linewidth(), gsd_popmatrix(), and gsd_pushmatrix().

Referenced by gs_put_label(), and gsd_put_legend().

◆ gsd_end_legend_viewport()

void gsd_end_legend_viewport ( void  )

ADD.

Definition at line 87 of file gsd_legend.c.

References GS_done_draw(), GS_set_draw(), GSD_BACK, and gsd_popmatrix().

Referenced by gs_put_label(), and gsd_put_legend().

◆ gsd_get_nice_range()

int gsd_get_nice_range ( float  lownum,
float  highnum,
int  numvals,
float vals 
)

ADD.

Parameters
lownum
highnum
numvals
vals
Returns
0 on failure
range value

Definition at line 116 of file gsd_legend.c.

References gsd_make_nice_number().

Referenced by gsd_put_legend().

◆ gsd_make_nice_number()

int gsd_make_nice_number ( float num)

ADD.

Parameters
num
Returns
0 on error
1 on success

Definition at line 149 of file gsd_legend.c.

Referenced by gsd_get_nice_range().

◆ gsd_put_legend()