Changeset 4012 for trunk/src/gdi32/text.cpp
- Timestamp:
- Aug 14, 2000, 5:51:20 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gdi32/text.cpp
r3648 r4012 1 /* $Id: text.cpp,v 1.1 0 2000-06-01 19:00:05 sandervlExp $ */1 /* $Id: text.cpp,v 1.11 2000-08-14 15:51:20 cbratschi Exp $ */ 2 2 3 3 /* … … 7 7 * 8 8 * Copyright 1993, 1994 Alexandre Julliard 9 * Copyright 1999 Christoph Bratschi9 * Copyright 1999-2000 Christoph Bratschi 10 10 * 11 11 * Project Odin Software License can be found in LICENSE.TXT … … 19 19 #include "oslibgpi.h" 20 20 21 #define DBG_LOCALLOG 21 #define DBG_LOCALLOG DBG_text 22 22 #include "dbglocal.h" 23 23 … … 95 95 INT SYSTEM EXPORT InternalDrawTextExA(HDC hdc,LPCSTR lpchText,INT cchText,LPRECT lprc,UINT dwDTFormat,LPDRAWTEXTPARAMS lpDTParams,BOOL isDrawTextEx) 96 96 { 97 /*98 PVOID pHps = OSLibGpiQueryDCData(hdc);99 97 INT rc; 100 98 ULONG flCmd; … … 102 100 PRECT rectPtr; 103 101 LONG lTabs,xLeft,yTop; 104 105 if ((!lpchText) || (cchText == 0) || (cchText < -1) || (!lprc == NULL)) 102 UINT fpuctrlword; 103 104 //SvL: Open32's DrawText messes up the fpu control word! (@#$@#$@#$) 105 //CB: don't know if this is still the case with WinDrawTabbedText (-> testcase) 106 fpuctrlword = _control87(0, 0); 107 108 if ((!lpchText) || (cchText == 0) || (cchText < -1) || (lprc == NULL)) 106 109 { 107 110 SetLastError(ERROR_INVALID_PARAMETER); 108 111 return 0; 109 112 } 113 114 PVOID pHps = OSLibGpiQueryDCData(hdc); 110 115 111 116 if (!pHps) … … 199 204 rectPtr = &localRectangle; 200 205 201 if ( getMapMode(pHps) == MMOS_ANISOTROPIC || getMapMode(pHps) == MMOS_ISOTROPIC)206 if ((getMapMode(pHps) == MMOS_ANISOTROPIC) || (getMapMode(pHps) == MMOS_ISOTROPIC)) 202 207 { 203 208 if (doesYAxisGrowNorth(pHps)) … … 232 237 if (isDrawTextEx) 233 238 { 234 lTabs = (lpDTParams && dwDTFormat & DT_TABSTOP) ? lpDTParams->iTabLength:8;239 lTabs = (lpDTParams && (dwDTFormat & DT_TABSTOP)) ? lpDTParams->iTabLength:8; 235 240 } else 236 241 { … … 385 390 386 391 if (!done) 392 { 387 393 rc = OSLibWinDrawTabbedText(pHps,cchText,lTabs,lpchText,rectPtr,0,0,flCmd); 394 } 388 395 389 396 if (dwDTFormat & DT_CALCRECT) … … 408 415 } 409 416 410 return rc;411 */412 UINT fpuctrlword;413 INT rc;414 415 //SvL: Open32's DrawText messes up the fpu control word! (@#$@#$@#$)416 fpuctrlword = _control87(0, 0);417 dwDTFormat &= ~(DT_END_ELLIPSIS | DT_PATH_ELLIPSIS);418 419 rc = O32_DrawText(hdc,lpchText,cchText,lprc,dwDTFormat);420 417 _control87(fpuctrlword, 0xFFFF); 418 421 419 return rc; 422 420 } … … 576 574 if (!pHps || (cbCount < 0) || ((lpszString == NULL) && (cbCount != 0))) 577 575 { 578 579 580 576 dprintf(("InternalTextOutA: invalid parameter")); 577 SetLastError(ERROR_INVALID_HANDLE); 578 return FALSE; 581 579 } 582 580 583 581 if (cbCount > 512) 584 582 { 585 586 587 583 dprintf(("InternalTextOutA: invalid parameter cbCount")); 584 SetLastError(ERROR_INVALID_PARAMETER); 585 return FALSE; 588 586 } 589 587 if (fuOptions & ~((UINT)(ETO_CLIPPED | ETO_OPAQUE))) 590 588 { 591 592 593 589 dprintf(("InternalTextOutA: invalid fuOptions")); 590 //ETO_GLYPH_INDEX, ETO_RTLLEADING, ETO_NUMERICSLOCAL, ETO_NUMERICSLATIN, ETO_IGNORELANGUAGE, ETO_PDY are ignored 591 return TRUE; 594 592 } 595 593 … … 603 601 if (excludeBottomRightPoint(pHps,(PPOINTLOS2)&pmRect) == 0) 604 602 { 605 603 dprintf(("InternalTextOutA: excludeBottomRightPoint returned 0")); 606 604 return TRUE; 607 605 } … … 610 608 if (fuOptions & ETO_OPAQUE) flOptions |= CHSOS_OPAQUE; 611 609 } 612 } 610 } 613 611 else 614 612 { 615 613 if (fuOptions) 616 614 { 617 618 619 615 dprintf(("InternalTextOutA: ERROR_INVALID_HANDLE")); 616 SetLastError(ERROR_INVALID_HANDLE); 617 return FALSE; 620 618 } 621 619 } … … 625 623 if (fuOptions & ETO_OPAQUE) 626 624 { 627 628 629 630 } 625 lpszString = " "; 626 cbCount = 1; 627 flOptions |= CHSOS_CLIP; 628 } 631 629 else { 632 633 630 dprintf(("InternalTextOutA: cbCount == 0")); 631 return TRUE; 634 632 } 635 633 } … … 643 641 644 642 flOptions |= CHSOS_LEAVEPOS; 645 } 643 } 646 644 else OSLibGpiQueryCurrentPosition(pHps,&ptl); 647 645 … … 675 673 676 674 if(hits == GPIOS_ERROR) { 677 678 675 dprintf(("InternalTextOutA: OSLibGpiCharStringPosAt returned GPIOS_ERROR")); 676 return FALSE; 679 677 } 680 678
Note:
See TracChangeset
for help on using the changeset viewer.