Changeset 18 for trunk/src/helpers/gpih.c
- Timestamp:
- Jan 1, 2001, 4:30:29 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/helpers/gpih.c
r14 r18 15 15 * example, WinQueryWindowRect returns an inclusive-exclusive 16 16 * rectangle (so that the xRight value is the same as the window 17 * width). However, GpiBox expects an inclusive-inclusive rectangle. 17 * width -- tested V0.9.7 (2000-12-20) [umoeller]). 18 * 19 * WinFillRect expects an inclusive-exclusive rectangle, so it 20 * will work with a rectangle from WinQueryWindowRect directly. 21 * 22 * By contrast, the GpiBox expects an inclusive-inclusive rectangle. 18 23 * 19 24 * Function prefixes (new with V0.81): … … 194 199 * (bitmap) PS's also. 195 200 * 196 * The specified rectangle is exclusive, meaning that 197 * the top right point lies _outside_ the rectangle 198 * which is actually drawn. This is the same as with 199 * WinFillRect. ### I don't think so any more... GpiBox 200 * uses inclusive-inclusive rectangles... 201 * The specified rectangle is inclusive, that is, the top 202 * right corner specifies the top right pixel to be drawn. 203 * This is different from WinFillRect. 201 204 * 202 205 * Changes to the HPS: … … 272 275 * The specified rectangle is inclusive, that is, the top 273 276 * right corner specifies the top right pixel to be drawn. 277 * This is different from WinFillRect. 274 278 * 275 279 * If usWidth > 1, the additional pixels will be drawn towards … … 288 292 289 293 VOID gpihDrawThickFrame(HPS hps, // in: presentation space for output 290 PRECTL prcl, // in: rectangle to draw ( exclusive)294 PRECTL prcl, // in: rectangle to draw (inclusive) 291 295 ULONG ulWidth) // in: line width (>= 1) 292 296 { … … 318 322 * The specified rectangle is inclusive, that is, the top 319 323 * right corner specifies the top right pixel to be drawn. 324 * This is different from WinFillRect. 320 325 * 321 326 * If usWidth > 1, the additional pixels will be drawn towards … … 324 329 * 325 330 *@@changed V0.9.0 [umoeller]: changed function prototype to have colors specified 331 *@@changed V0.9.7 (2000-12-20) [umoeller]: now really using inclusive rectangle... 326 332 */ 327 333 328 334 VOID gpihDraw3DFrame(HPS hps, 329 PRECTL prcl, // in: rectangle 335 PRECTL prcl, // in: rectangle (inclusive) 330 336 USHORT usWidth, // in: line width (>= 1) 331 337 LONG lColorLeft, // in: color to use for left and top; e.g. SYSCLR_BUTTONLIGHT … … 342 348 ptl1.y = rcl2.yBottom; 343 349 GpiMove(hps, &ptl1); 344 ptl1.y = rcl2.yTop -1;350 ptl1.y = rcl2.yTop; // V0.9.7 (2000-12-20) [umoeller] 345 351 GpiLine(hps, &ptl1); 346 ptl1.x = rcl2.xRight -1;352 ptl1.x = rcl2.xRight; // V0.9.7 (2000-12-20) [umoeller] 347 353 GpiLine(hps, &ptl1); 348 354 GpiSetColor(hps, lColorRight); … … 1063 1069 * screen yourself and need the height of a text 1064 1070 * line to advance to the next. 1065 */ 1066 1067 LONG gpihQueryLineSpacing(HPS hps, 1068 PSZ pszText) // in: text to output 1071 * 1072 *@@changed V0.9.7 (2000-12-20) [umoeller]: removed psz param 1073 */ 1074 1075 LONG gpihQueryLineSpacing(HPS hps) 1069 1076 { 1070 1077 FONTMETRICS fm; 1071 POINTL aptlText[TXTBOX_COUNT];1072 GpiQueryTextBox(hps, strlen(pszText), pszText,1073 TXTBOX_COUNT, (PPOINTL)&aptlText);1074 1078 1075 1079 if (GpiQueryFontMetrics(hps, sizeof(FONTMETRICS), &fm)) 1076 1080 return ( ( fm.lMaxBaselineExt // max vertical font space 1077 1081 +fm.lExternalLeading) // space advised by font designer 1078 // * 12 / 101079 1082 ); 1080 1083 else
Note:
See TracChangeset
for help on using the changeset viewer.