Changeset 21997 for trunk/src/gdi32/text.cpp
- Timestamp:
- Apr 10, 2012, 9:55:43 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gdi32/text.cpp
r21628 r21997 95 95 //****************************************************************************** 96 96 // todo: metafile support 97 //#undef INVERT 98 //#define INVERT_SETYINVERSION 97 99 //****************************************************************************** 98 100 BOOL InternalTextOutAW(HDC hdc,int X,int Y,UINT fuOptions, … … 133 135 } 134 136 137 #if defined(INVERT) && !defined(INVERT_SETYINVERSION) 138 if(pHps->yInvert > 0) { 139 Y = pHps->yInvert - Y; 140 } 141 #endif 142 143 #ifdef INVERT_SETYINVERSION 144 int oldyinv = GpiQueryYInversion(pHps->hps); 145 Y = oldyinv - Y; 146 #endif 147 135 148 // When using font association, the height of DBCS and SBCS chars may be different. 136 149 // In this case, background color make stair below chars … … 168 181 return TRUE; 169 182 } 183 #ifndef INVERT 184 #ifdef INVERT_SETYINVERSION 185 if (oldyinv) { 186 int temp = oldyinv - pmRect.yTop; 187 pmRect.yTop = oldyinv - pmRect.yBottom; 188 pmRect.yBottom = temp; 189 } 190 #else 191 if (pHps->yInvert > 0) { 192 int temp = pHps->yInvert - pmRect.yTop; 193 pmRect.yTop = pHps->yInvert - pmRect.yBottom; 194 pmRect.yBottom = temp; 195 } 196 #endif 197 #endif 170 198 171 199 if (fuOptions & ETO_CLIPPED) flOptions |= CHSOS_CLIP; … … 216 244 } 217 245 } 246 247 #ifdef INVERT_SETYINVERSION 248 GpiEnableYInversion(pHps->hps, 0); 249 #endif 218 250 219 251 if (lpDx) … … 309 341 if(hits == GPIOS_ERROR) { 310 342 dprintf(("InternalTextOutA: OSLibGpiCharStringPosAt returned GPIOS_ERROR")); 343 #ifdef INVERT_SETYINVERSION 344 GpiEnableYInversion(pHps->hps, oldyinv); 345 #endif 311 346 return FALSE; 312 347 } … … 321 356 OSLibGpiSetCurrentPosition(pHps,&ptl); 322 357 } 358 359 #ifdef INVERT_SETYINVERSION 360 GpiEnableYInversion(pHps->hps, oldyinv); 361 #endif 323 362 324 363 DIBSECTION_MARK_INVALID(hdc);
Note:
See TracChangeset
for help on using the changeset viewer.