00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef _STRING_BOX_H_
00010 #define _STRING_BOX_H_
00011
00012 #include "machine.h"
00013 #include "StringMatrix.h"
00014 #include "Vect2Matrix.h"
00015 #include "ObjectStructure.h"
00016
00017
00025 void getStringBbox( char * string, int center[2], int rect[4] ) ;
00026
00032 void callXstringL( char * string, int posX, int posY, int boundingRect[4] ) ;
00033
00038 void getStringBox( char ** text ,
00039 double textPos[2] ,
00040 int textDim[2] ,
00041 BOOL autoSize ,
00042 double userSize[2] ,
00043 double angle ,
00044 int fontId ,
00045 int fontSize ,
00046 double corners[4][2] ) ;
00047
00061 void getStringsRect( StringMatrix * strMat ,
00062 int textPos[2] ,
00063 Vect2iMatrix * stringPosition ,
00064 int boundingBox[4][2] ) ;
00065
00081 void getStringsRectSized( StringMatrix * strMat ,
00082 int textPos[2] ,
00083 Vect2iMatrix * stringPosition ,
00084 int boundingBox[4][2],
00085 int userSize[2] ,
00086 int * newFontSize ) ;
00087
00113 void getStringsPositions( StringMatrix * strMat ,
00114 int * fontId ,
00115 int * fontSize ,
00116 int textPos[2] ,
00117 BOOL autoSize ,
00118 int textSize[2] ,
00119 BOOL centerPos ,
00120 double angle ,
00121 Vect2iMatrix * stringPosition,
00122 int boundingBox[4][2] ) ;
00123
00130 void getTextBoundingBox( sciPointObj * pText ,
00131 int cornPix[4][2],
00132 double corners[4][2] ) ;
00133
00141 void getTextAabb( sciPointObj * pText ,
00142 int rectPix[4] ,
00143 int cornPix[4][2] ) ;
00144
00150 void rotateBoundingBox( int boundingBox[4][2], int center[2], double angle ) ;
00151
00157 void translateBoundingBox( int boundingBox[4][2], int trans[2] ) ;
00158
00162 int getStringHorizontalSpace( void ) ;
00163
00167 int getStringVerticalSpace( void ) ;
00168
00169
00173 BOOL isFittingInCell( char * string, int cellWidth, int cellHeight ) ;
00174
00188 void getStringPositionTranslation( BOOL centeredPos, int textSize[2], int bbox[4][2], int trans[2] ) ;
00189
00195 int computeSuitableFont( StringMatrix * strMat, Vect2iMatrix * stringPosition ) ;
00196
00197 #endif