Changeset 10174 for trunk/src/gdi32/oslibgpi.cpp
- Timestamp:
- Jul 16, 2003, 5:47:37 PM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gdi32/oslibgpi.cpp
r9737 r10174 1 /* $Id: oslibgpi.cpp,v 1.1 3 2003-01-28 16:21:48sandervl Exp $ */1 /* $Id: oslibgpi.cpp,v 1.14 2003-07-16 15:47:37 sandervl Exp $ */ 2 2 3 3 /* … … 259 259 if (box[TXTBOX_BOTTOMLEFT].y == box[TXTBOX_BOTTOMRIGHT].y) 260 260 { 261 point->y = labs (box[TXTBOX_BOTTOMLEFT].y-box[TXTBOX_TOPLEFT].y); 262 point->x = labs (box[TXTBOX_BOTTOMRIGHT].x-box[TXTBOX_BOTTOMLEFT].x); 263 261 point->y = labs (box[TXTBOX_BOTTOMLEFT].y-box[TXTBOX_TOPLEFT].y) + 1; 262 point->x = labs (box[TXTBOX_BOTTOMRIGHT].x-box[TXTBOX_BOTTOMLEFT].x) + 1; 264 263 if (box[TXTBOX_BOTTOMLEFT].x != box[TXTBOX_TOPLEFT].x) 265 264 { … … 272 271 } else 273 272 { 274 cx = labs (box[TXTBOX_BOTTOMLEFT].x-box[TXTBOX_TOPLEFT].x) ;275 cy = labs (box[TXTBOX_BOTTOMLEFT].y-box[TXTBOX_TOPLEFT].y) ;273 cx = labs (box[TXTBOX_BOTTOMLEFT].x-box[TXTBOX_TOPLEFT].x) + 1; 274 cy = labs (box[TXTBOX_BOTTOMLEFT].y-box[TXTBOX_TOPLEFT].y) + 1; 276 275 point->y = (ULONG)hypot(cx,cy); 277 276 278 cx = labs (box[TXTBOX_TOPRIGHT].x-box[TXTBOX_TOPLEFT].x) ;279 cy = labs (box[TXTBOX_TOPRIGHT].y-box[TXTBOX_TOPLEFT].y) ;277 cx = labs (box[TXTBOX_TOPRIGHT].x-box[TXTBOX_TOPLEFT].x) + 1; 278 cy = labs (box[TXTBOX_TOPRIGHT].y-box[TXTBOX_TOPLEFT].y) + 1; 280 279 point->x = (ULONG)hypot(cx,cy); 281 280 } … … 400 399 401 400 402 int OSLibGpiQueryFontMaxHeight(HDC hdc) 401 int OSLibGpiQueryFontMaxHeight(HDC hdc) 403 402 { 404 403 FONTMETRICS metrics; … … 407 406 rc = GpiQueryFontMetrics(hdc, sizeof(metrics), &metrics); 408 407 if(rc) { 409 return max(metrics.lMaxBaselineExt,410 max(metrics.lMaxAscender+metrics.lMaxDescender, 408 return max(metrics.lMaxBaselineExt, 409 max(metrics.lMaxAscender+metrics.lMaxDescender, 411 410 metrics.lInternalLeading+metrics.lEmHeight)); 412 411 } 413 412 else { 414 415 413 dprintf(("GpiQueryFontMetrics returned FALSE!!")); 414 return 0; 416 415 } 417 416 } … … 425 424 if(!pHps) 426 425 { 427 426 return; 428 427 } 429 428
Note:
See TracChangeset
for help on using the changeset viewer.