*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> OpenGL-GLC/glcgetstringcharmetric (3)              
Title
Content
Arch
Section
 

Contents


glcGetStringCharMetric(3G)			     OpenGL Character Renderer


NAME    [Toc]    [Back]

     glcGetStringCharMetric - retrieve character metric	from measurement
     buffer

C SPECIFICATION    [Toc]    [Back]

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

PARAMETERS    [Toc]    [Back]

     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    [Toc]    [Back]

     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    [Toc]    [Back]

     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    [Toc]    [Back]

     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    [Toc]    [Back]

     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    [Toc]    [Back]

      
      
     glcGetCharMetric, glcGetMaxCharMetric, glcMeasureCountedString,
     glcMeasureString


									PPPPaaaaggggeeee 2222
[ Back ]
 Similar pages
Name OS Title
glcmeasurecountedstring IRIX store a string of specified length in measurement buffer
glcgetstringmetric IRIX return a string metric
tt_message_context_val HP-UX retrieve the character string of a message's context
DtEditorGetLastPosition HP-UX retrieve the position of the last character in a DtEditor widget
tt_message_status_string HP-UX retrieve the character string stored with the status attribute for a message
isencrypt IRIX determine whether a character buffer is encrypted
installfoliofonts IRIX Install POSTSCRIPT outline font and font metric file
XmTextFieldGetSubstringWcs Tru64 A TextField function that retrieves a portion of a wide character internal text buffer
XmTextFieldGetSubstringWcs HP-UX A TextField function that retrieves a portion of a wide character internal text buffer
XmTextFieldGetSubstringWcs IRIX A TextField function that retrieves a a portion of a wide character internal text buffer
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service