getTextInfo method

void getTextInfo(
  1. String text,
  2. ClipTextInfo info
)

Implementation

void getTextInfo( String text, ClipTextInfo info ){
	info._width   = 0;
	info._ascent  = 0;
	info._descent = 0;

	int chr;
	for( int i = 0; i < text.length; i++ ){
		chr = ClipMath.charCodeAt( text, i );
		if( _charInfo[_charSet][chr]._data != null ){
			info._width += _charInfo[_charSet][chr]._width;
			if( _charInfo[_charSet][chr]._ascent > info._ascent ){
				info._ascent = _charInfo[_charSet][chr]._ascent;
			}
			if( _charInfo[_charSet][chr]._descent > info._descent ){
				info._descent = _charInfo[_charSet][chr]._descent;
			}
		}
	}
}