- Timestamp:
- Jan 28, 2003, 5:21:49 PM (23 years ago)
- Location:
- trunk/src/gdi32
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gdi32/oslibgpi.cpp
r9443 r9737 1 /* $Id: oslibgpi.cpp,v 1.1 2 2002-11-29 13:46:04sandervl Exp $ */1 /* $Id: oslibgpi.cpp,v 1.13 2003-01-28 16:21:48 sandervl Exp $ */ 2 2 3 3 /* … … 407 407 rc = GpiQueryFontMetrics(hdc, sizeof(metrics), &metrics); 408 408 if(rc) { 409 return metrics.lMaxAscender; 409 return max(metrics.lMaxBaselineExt, 410 max(metrics.lMaxAscender+metrics.lMaxDescender, 411 metrics.lInternalLeading+metrics.lEmHeight)); 410 412 } 411 413 else { -
trunk/src/gdi32/text.cpp
r9609 r9737 1 /* $Id: text.cpp,v 1.3 1 2003-01-04 13:45:10sandervl Exp $ */1 /* $Id: text.cpp,v 1.32 2003-01-28 16:21:49 sandervl Exp $ */ 2 2 3 3 /* … … 73 73 //****************************************************************************** 74 74 // todo: metafile support 75 //#undef INVERT 76 //#define INVERT_SETYINVERSION 75 77 //****************************************************************************** 76 78 BOOL InternalTextOutA(HDC hdc,int X,int Y,UINT fuOptions,CONST RECT *lprc,LPCSTR lpszString,INT cbCount,CONST INT *lpDx,BOOL IsExtTextOut) … … 101 103 return TRUE; 102 104 } 105 106 #if defined(INVERT) && !defined(INVERT_SETYINVERSION) 107 if(pHps->yInvert > 0) { 108 Y = pHps->yInvert - Y; 109 } 110 #endif 111 112 #ifdef INVERT_SETYINVERSION 113 int oldyinv = GpiQueryYInversion(pHps->hps); 114 Y = oldyinv - Y; 115 #endif 103 116 104 117 //CB: add metafile info … … 115 128 } 116 129 #ifndef INVERT 130 #ifdef INVERT_SETYINVERSION 131 if (oldyinv) { 132 int temp = oldyinv - pmRect.yTop; 133 pmRect.yTop = oldyinv - pmRect.yBottom; 134 pmRect.yBottom = temp; 135 } 136 #else 117 137 if (pHps->yInvert > 0) { 118 138 int temp = pHps->yInvert - pmRect.yTop; … … 120 140 pmRect.yBottom = temp; 121 141 } 142 #endif 122 143 #endif 123 144 … … 162 183 } 163 184 } 185 186 #ifdef INVERT_SETYINVERSION 187 GpiEnableYInversion(pHps->hps, 0); 188 #endif 189 164 190 if (lpDx) 165 191 flOptions |= CHSOS_VECTOR; … … 169 195 ptl.x = X; 170 196 ptl.y = Y; 171 172 #ifndef INVERT173 if (pHps->yInvert > 0) {174 ptl.y = pHps->yInvert - Y;175 }176 #endif177 197 178 198 flOptions |= CHSOS_LEAVEPOS; … … 210 230 } 211 231 232 #ifdef INVERT 212 233 ptl.y += getWorldYDeltaFor1Pixel(pHps); 213 214 #ifndef INVERT 234 #else 235 ptl.y -= getWorldYDeltaFor1Pixel(pHps); 236 215 237 int vertAdjust = 0; 216 if ((pHps->taMode & 0x18) == TA_TOP)238 if ((pHps->taMode & 0x18) != TA_TOP) 217 239 { 218 240 vertAdjust = OSLibGpiQueryFontMaxHeight(pHps->hps); … … 228 250 if(hits == GPIOS_ERROR) { 229 251 dprintf(("InternalTextOutA: OSLibGpiCharStringPosAt returned GPIOS_ERROR")); 252 #ifdef INVERT_SETYINVERSION 253 GpiEnableYInversion(pHps->hps, oldyinv); 254 #endif 230 255 return FALSE; 231 256 } … … 241 266 } 242 267 268 #ifdef INVERT_SETYINVERSION 269 GpiEnableYInversion(pHps->hps, oldyinv); 270 #endif 243 271 return TRUE; 244 272 }
Note:
See TracChangeset
for help on using the changeset viewer.