Loading...
Searching...
No Matches
gsd_fonts.c File Reference

OGSF library - loading and manipulating surfaces. More...

`#include <string.h>`
`#include <assert.h>`
`#include <grass/ogsf.h>`
`#include "rgbpack.h"`
Include dependency graph for gsd_fonts.c:

Go to the source code of this file.

## Functions

int | gsd_get_txtwidth (const char *s, int size)
| Get text width.
int | gsd_get_txtheight (int size)
| Get text height.
int | get_txtdescender (void)
| Get text descender.
int | get_txtxoffset (void)
| Get text offset.
void | do_label_display (GLuint fontbase, float *lab_pos, const char *txt)
| Display label.

## Detailed Description

OGSF library - loading and manipulating surfaces.

OGSF library - manipulating surfaces/fridge (lower level function).

GRASS OpenGL gsurf OGSF Library

Todo
  This file needs to be re-written in OpenGL

(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, GMSL/University of Illinois
  Doxygenized by Martin Landa <landa.martin gmail.com> (May 2008)

GRASS OpenGL gsurf OGSF Library

Todo
  This file needs to be re-written in OpenGL

(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, GMSL/University of Illinois
  Doxygenized by Martin Landa <landa.martin gmail.com> (May 2008)

Definition in file gsd_fonts.c.

## Function Documentation

## do_label_display()

void do_label_display | ( | GLuint | fontbase,
|  | float * | lab_pos,
|  | const char * | txt )

Display label.

Parameters

  fontbase | font-base
  lab_pos | label position
  txt | text string

Definition at line 97 of file gsd_fonts.c.

References X, and Y.

Referenced by gs_put_label(), and gsd_put_legend().

## get_txtdescender()

int get_txtdescender | ( | void |  | ) |

Get text descender.

yorig ??

Is this defined somewhere ?

Returns
  2

Definition at line 71 of file gsd_fonts.c.

## get_txtxoffset()

int get_txtxoffset | ( | void |  | ) |

Get text offset.

xorig ??

Is this defined somewhere ?

Returns
  0

Definition at line 85 of file gsd_fonts.c.

Referenced by gsd_put_legend().

## gsd_get_txtheight()

int gsd_get_txtheight | ( | int | size | ) |

Get text height.

Parameters

  size | size

Returns
  text height

Definition at line 53 of file gsd_fonts.c.

Referenced by gsd_north_arrow(), gsd_put_legend(), and gsd_scalebar().

## gsd_get_txtwidth()

int gsd_get_txtwidth | ( | const char * | s,
|  | int | size )

Get text width.

Parameters

  s | text string
  size | size

Returns
  text width

Definition at line 36 of file gsd_fonts.c.

Referenced by gs_put_label(), gsd_north_arrow(), gsd_put_legend(), and gsd_scalebar().