Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Hershey.C File Reference

#include "Hershey.h"
#include <GL/gl.h>

Go to the source code of this file.

Defines

#define VMDHERSHEYFIXEDNUMERICS   1
#define VMD_DEFAULT_FONT_SCALE   0.0015f

Functions

float h2float (char c)
void hersheyDrawLetterOpenGL (unsigned char ch, int drawendpoints)
 This routine generates a sequence of OpenGL drawing commands that can be captured in a display list for fast subsequent rendering of each of the font glyphs. More...

void hersheyDrawInitLetter (hersheyhandle *hh, const char ch, float *lm, float *rm)
 For VMD FileRenderer subclasses, it is most convenient to generate the font glyphs on the fly. This routine initializes a glyph rendering context for the requested character, to be accessed by subsequent calls to hersheyDrawNextLine(). The lm and rm values are X coordinate offsets to be applied before (lm) and after (rm) rendering the glyph, to produce the correct text spacing. More...

int hersheyDrawNextLine (hersheyhandle *hh, int *draw, float *x, float *y)
 This routine computes the next glyph stroke vector, returning false for a run of connected strokes, and true when the stroke ends. It sets the value of the 'draw' parameter to true when X and Y are set, which allows the caller to determine when strokes begin and end, and to connect the segments with whatever geometry works best for the specific renderer. More...


Variables

char * hersheyFontData []


Define Documentation

#define VMD_DEFAULT_FONT_SCALE   0.0015f
 

Definition at line 267 of file Hershey.C.

Referenced by h2float.

#define VMDHERSHEYFIXEDNUMERICS   1
 

Definition at line 114 of file Hershey.C.


Function Documentation

float h2float char    c [inline]
 

Definition at line 270 of file Hershey.C.

References VMD_DEFAULT_FONT_SCALE.

Referenced by hersheyDrawInitLetter, hersheyDrawLetterOpenGL, and hersheyDrawNextLine.

void hersheyDrawInitLetter hersheyhandle   hh,
const char    ch,
float *    lm,
float *    rm
 

For VMD FileRenderer subclasses, it is most convenient to generate the font glyphs on the fly. This routine initializes a glyph rendering context for the requested character, to be accessed by subsequent calls to hersheyDrawNextLine(). The lm and rm values are X coordinate offsets to be applied before (lm) and after (rm) rendering the glyph, to produce the correct text spacing.

Definition at line 327 of file Hershey.C.

References h2float, hersheyFontData, hersheyhandle::lm, hersheyhandle::p, and hersheyhandle::rm.

void hersheyDrawLetterOpenGL unsigned char    ch,
int    drawendpoints
 

This routine generates a sequence of OpenGL drawing commands that can be captured in a display list for fast subsequent rendering of each of the font glyphs.

Definition at line 275 of file Hershey.C.

References h2float, and hersheyFontData.

int hersheyDrawNextLine hersheyhandle   hh,
int *    draw,
float *    x,
float *    y
 

This routine computes the next glyph stroke vector, returning false for a run of connected strokes, and true when the stroke ends. It sets the value of the 'draw' parameter to true when X and Y are set, which allows the caller to determine when strokes begin and end, and to connect the segments with whatever geometry works best for the specific renderer.

Definition at line 337 of file Hershey.C.

References h2float, and hersheyhandle::p.


Variable Documentation

char* hersheyFontData[]
 

Definition at line 116 of file Hershey.C.

Referenced by hersheyDrawInitLetter, and hersheyDrawLetterOpenGL.


Generated on Thu Apr 18 02:46:04 2024 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002