Changeset 1851 in Sophya for trunk/SophyaPI/PI/pigraphps.cc
- Timestamp:
- Jan 11, 2002, 7:53:14 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PI/pigraphps.cc
r1848 r1851 114 114 void PIGraphicPS::DrawString(PIGrCoord x, PIGrCoord y, const char* s, int pos) 115 115 { 116 if(mPSOut) 117 // mPSOut->DrawString((double)x,(double)y,s,mFCol,mFAtt,mFSize); /* $CHECK$ PIFontSize ?? */ 118 mPSOut->DrawString((double)x,(double)y,s,mFCol, myFont.GetFontName(), 119 myFont.GetFontAtt(), myFont.GetFontSize(), 120 pos); /* $CHECK$ x 0.9 - Reza 4/11/99 - enleve 3/01/2002 */ 121 // Calculez la taille de la boite occupe par la fonte 122 // myFont.GetFontHeight(int& asc, int& desc) Tres proche de myFont.GetFontSize() en principe 123 // myFont.GetStringWidth(char const* s) Largeur occupe par la chaine 116 if(mPSOut) { 117 int posh = pos & PI_HorizontalPosition; 118 int posv = pos & PI_VerticalPosition; 119 int dx,dy; 120 double xd = x; 121 double yd = y; 122 if ( CalcStringPositionShift(s, posv, dx, dy) ) yd -= dy; 123 mPSOut->DrawString(xd, yd, s, mFCol, myFont.GetFontName(), myFont.GetFontAtt(), 124 myFont.GetFontSize(), posh); 125 } 124 126 return; 125 127 } … … 128 130 void PIGraphicPS::DrawOpaqueString(PIGrCoord x, PIGrCoord y, const char* s, int pos) 129 131 { 130 if(mPSOut) 131 // mPSOut->DrawString((double)x,(double)y,s,mFCol,mFAtt,mFSize); /* $CHECK$ PIFontSize ?? */ 132 mPSOut->DrawString((double)x,(double)y,s,mFCol, myFont.GetFontName(), 133 myFont.GetFontAtt(), myFont.GetFontSize(), 134 pos); /* $CHECK$ x 0.9 - Reza 4/11/99 */ 135 // Idem taille ici 132 if(mPSOut) { 133 int posh = pos & PI_HorizontalPosition; 134 int posv = pos & PI_VerticalPosition; 135 int dx,dy; 136 double xd = x; 137 double yd = y; 138 if ( CalcStringPositionShift(s, posv, dx, dy) ) yd -= dy; 139 mPSOut->DrawString(xd, yd, s, mFCol, myFont.GetFontName(), myFont.GetFontAtt(), 140 myFont.GetFontSize(), posh); 141 } 136 142 return; 137 143 }
Note:
See TracChangeset
for help on using the changeset viewer.