glcGetStringCharMetric man page on IRIX

Man page or keyword search:  
man Server   31559 pages
apropos Keyword Search (all sections)
Output format
IRIX logo
[printable version]



glcGetStringCharMetric(3G)			     OpenGL Character Renderer

NAME
     glcGetStringCharMetric - retrieve character metric from measurement
     buffer

C SPECIFICATION
     GLfloat* glcGetStringCharMetric( GLint inIndex,
				      GLCenum inMetric,
				      GLfloat *outVec )

PARAMETERS
     inIndex   Specifies which element in the string to measure.

     inMetric  Specifies the metric to measure, either GLC_BASELINE or
	       GLC_BOUNDS.

     outVec    Specifies a vector in which to store value of inMetric for the
	       specified character.

DESCRIPTION
     glcGetStringCharMetric retrieves a character metric from the GLC
     measurement buffer and stores it in outVec. To store a string in the
     measurement buffer, call glcMeasureCountedString or glcMeasureString.

     The position of the character to measure is specified by inIndex.	The
     metric, either GLC_BASELINE or GLC_BOUNDS, is specified by inMetric.

     If the command does not raise an error, its return value is outVec. If
     inMetric is  GLC_BOUNDS, the vector returned in outVec starts in the
     lower left corner and continues in a counterclockwise direction.

EXAMPLES
     The following example first calls glcMeasureString to store the string
     "hello" in the measurement buffer. It then retrieves both the baseline
     and the bounding box for the whole string, then for each individual
     character.

     GLfloat overallBaseline[4];
     GLfloat overallBoundingBox[8];

     GLfloat charBaselines[4][5];
     GLfloat charBoundingBoxes[8][5];

     GLint i;

     glcMeasureString(GL_TRUE, "hello");

     glcGetStringMetric(GLC_BASELINE, overallBaseline);
     glcGetStringMetric(GLC_BOUNDS, overallBoundingBox);

									Page 1

glcGetStringCharMetric(3G)			     OpenGL Character Renderer

     for (i = 0 ; i < 5 ; ++i) {
	 glcGetStringCharMetric(i, GLC_BASELINE, charBaselines[i]);
	 glcGetStringCharMetric(i, GLC_BOUNDS, charBoundingBoxes[i]);
     }

NOTES
     glcGetStringCharMetric is useful if you're interested in the metric of a
     character as it appears in a string, that is, influenced by kerning,
     ligatures, and so on. To measure a character as if it started at the
     origin, call glcGetCharMetric.

ERRORS
     GLC_PARAMETER_ERROR is generated if inIndex is less than zero or is
     greater than or equal to the value of the variable
     GLC_MEASURED_CHAR_COUNT.

SEE ALSO
     glcGetCharMetric, glcGetMaxCharMetric, glcMeasureCountedString,
     glcMeasureString

									Page 2

[top]

List of man pages available for IRIX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net