src/fixedfontwrap.cpp
// calculateMultilineTextSize ********
// This method is used to calculate the size of a given multiline text
// as drawn by drawMultilineText.

calculateMultilineTextSize
This method is used to calculate the size of a given multiline text
as drawn by drawMultilineText.
calculateMultilineTextSize This method is used to calculate the size of a given multiline text as drawn by drawMultilineText .
bool fixedFontClass::calculateMultilineTextSize(
	ddSurfaceClass& srfTo,
	char* text,
	int textSize,
	int x, int y,
	int boxWidth, int boxHeight,
	alignEnum alignment,
	valignEnum verticalAlignment,
	int* definitiveX, int* definitiveY,
	int* definitiveW, int* definitiveH)
{
	bool errorCode;
	int tempDX, tempDY, tempDW, tempDH;
	errorCode=privateDrawMultilineText(
		srfTo, text, textSize,
		x, y, boxWidth, boxHeight,
		false, alignment, false,
		&tempDX, &tempDY, &tempDW, &tempDH);
	switch(verticalAlignment) {
	case FILE_DDWRAP_VALIGN_TOP:
		break;
	case FILE_DDWRAP_VALIGN_CENTER:
		tempDY=(boxHeight-tempDH)/2+tempDY;
		break;
	case FILE_DDWRAP_VALIGN_BOTTOM:
		tempDY=(boxHeight-tempDH)+tempDY;
		break;
	}
	if (definitiveX!=NULL) (*definitiveX)=tempDX;
	if (definitiveY!=NULL) (*definitiveY)=tempDY;
	if (definitiveW!=NULL) (*definitiveW)=tempDW;
	if (definitiveH!=NULL) (*definitiveH)=tempDH;
	return errorCode;
}
bool fixedFontClass :: calculateMultilineTextSize ( ddSurfaceClass & srfTo , char * text , int textSize , int x , int y , int boxWidth , int boxHeight , alignEnum alignment , valignEnum verticalAlignment , int * definitiveX , int * definitiveY , int * definitiveW , int * definitiveH ) { bool errorCode ; int tempDX , tempDY , tempDW , tempDH ; errorCode = privateDrawMultilineText ( srfTo , text , textSize , x , y , boxWidth , boxHeight , false , alignment , false , & tempDX , & tempDY , & tempDW , & tempDH ) ; switch ( verticalAlignment ) { case FILE_DDWRAP_VALIGN_TOP : break ; case FILE_DDWRAP_VALIGN_CENTER : tempDY = ( boxHeight - tempDH ) / 2 + tempDY ; break ; case FILE_DDWRAP_VALIGN_BOTTOM : tempDY = ( boxHeight - tempDH ) + tempDY ; break ; } if ( definitiveX != NULL ) ( * definitiveX ) = tempDX ; if ( definitiveY != NULL ) ( * definitiveY ) = tempDY ; if ( definitiveW != NULL ) ( * definitiveW ) = tempDW ; if ( definitiveH != NULL ) ( * definitiveH ) = tempDH ; return errorCode ; }
calculateMultilineTextSize 
This method is used to calculate the size of a given multiline text
as drawn by drawMultilineText.
calculateMultilineTextSize This method is used to calculate the size of a given multiline text as drawn by drawMultilineText .
// surface where to draw the text
 // text to draw
 // size of the string to draw
 // position where to draw the text
 // size of the text box (used for clipping)
 // text alignment, either FILE_DDWRAP_ALIGN_LEFT, FILE_DDWRAP_ALIGN_CENTER or FILE_DDWRAP_ALIGN_RIGHT
 // text vertical alignment, either FILE_DDWRAP_VALIGN_TOP, FILE_DDWRAP_VALIGN_CENTER or FILE_DDWRAP_VALIGN_BOTTOM
 // pointer to variables where to return the text box coordinates and size
 // let's calculate the text real size
 // surface and text
 // text box coordinates and size
 // transparency, alignment, and drawable
 // where to save the text size data
 // let's take into consideration the vertical alignment
 // there is nothing to do in this case
 // return the text size data
