Changeset 14 for trunk/src/helpers/gpih.c
- Timestamp:
- Dec 9, 2000, 8:19:42 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/helpers/gpih.c
r13 r14 6 6 * Usage: All PM programs. 7 7 * 8 * A word about GPI rectangles: In general, graphics operations involving 9 * device coordinates (such as regions, bit maps and bit blts, and window 10 * management) use inclusive-exclusive rectangles. All other graphics 11 * operations, such as GPI functions that define paths, use inclusive-inclusive 12 * rectangles. 8 * A word about GPI rectangles: In general, graphics operations 9 * involving device coordinates (such as regions, bit maps and 10 * bit blts, and window management) use inclusive-exclusive 11 * rectangles. All other graphics operations, such as GPI 12 * functions that define paths, use inclusive-inclusive rectangles. 13 * 14 * This can be a problem with mixing Win and Gpi functions. For 15 * example, WinQueryWindowRect returns an inclusive-exclusive 16 * rectangle (so that the xRight value is the same as the window 17 * width). However, GpiBox expects an inclusive-inclusive rectangle. 13 18 * 14 19 * Function prefixes (new with V0.81): … … 23 28 /* 24 29 * Copyright (C) 1997-2000 Ulrich Mller. 25 * This file is part of the XWorkplacesource package.26 * XWorkplaceis free software; you can redistribute it and/or modify30 * This file is part of the "XWorkplace helpers" source package. 31 * This is free software; you can redistribute it and/or modify 27 32 * it under the terms of the GNU General Public License as published 28 33 * by the Free Software Foundation, in version 2 as it comes in the … … 39 44 // as unsigned char 40 45 41 #define INCL_DOSDEVIOCTL42 #define INCL_DOS43 46 #define INCL_DOSERRORS 44 #define INCL_WIN 45 #define INCL_GPI 47 48 #define INCL_WINWINDOWMGR 49 #define INCL_WINPOINTERS 50 #define INCL_WINSYS 51 52 #define INCL_GPIPRIMITIVES 53 #define INCL_GPIBITMAPS 54 #define INCL_GPILOGCOLORTABLE 55 #define INCL_GPILCIDS 46 56 #include <os2.h> 47 57 … … 68 78 69 79 /* ****************************************************************** 70 * *71 * Device helpers *72 * *80 * 81 * Device helpers 82 * 73 83 ********************************************************************/ 74 84 … … 100 110 101 111 /* ****************************************************************** 102 * *103 * Color helpers *104 * *112 * 113 * Color helpers 114 * 105 115 ********************************************************************/ 106 116 … … 139 149 140 150 /* ****************************************************************** 141 * *142 * Drawing primitives helpers *143 * *151 * 152 * Drawing primitives helpers 153 * 144 154 ********************************************************************/ 145 155 … … 187 197 * the top right point lies _outside_ the rectangle 188 198 * which is actually drawn. This is the same as with 189 * WinFillRect. 199 * WinFillRect. ### I don't think so any more... GpiBox 200 * uses inclusive-inclusive rectangles... 190 201 * 191 202 * Changes to the HPS: … … 252 263 GpiMove(hps, &ptlSave); 253 264 GpiSetColor(hps, lColorSave); 265 } 266 267 /* 268 *@@ gpihThickBox: 269 * draws a box from the specified rectangle with the 270 * specified width. 271 * 272 * The specified rectangle is inclusive, that is, the top 273 * right corner specifies the top right pixel to be drawn. 274 * 275 * If usWidth > 1, the additional pixels will be drawn towards 276 * the _center_ of the rectangle. prcl thus always specifies 277 * the bottom left and top right pixels to be drawn. 278 * 279 * This is different from using GpiSetLineWidth, with which 280 * I was unable to find out in which direction lines are 281 * extended. 282 * 283 * This is similar to gpihDraw3DFrame, except that everything 284 * is painted in the current color. 285 * 286 *@@added V0.9.7 (2000-12-06) [umoeller] 287 */ 288 289 VOID gpihDrawThickFrame(HPS hps, // in: presentation space for output 290 PRECTL prcl, // in: rectangle to draw (exclusive) 291 ULONG ulWidth) // in: line width (>= 1) 292 { 293 ULONG ul = 0; 294 for (; 295 ul < ulWidth; 296 ul++) 297 { 298 GpiMove(hps, (PPOINTL)prcl); 299 GpiBox(hps, 300 DRO_OUTLINE, 301 (PPOINTL)&(prcl->xRight), 302 0, 303 0); 304 305 // and one more to the outside 306 prcl->xLeft++; 307 prcl->yBottom++; 308 prcl->xRight--; 309 prcl->yTop--; 310 } 254 311 } 255 312 … … 355 412 356 413 /* ****************************************************************** 357 * *358 * Font helpers *359 * *414 * 415 * Font helpers 416 * 360 417 ********************************************************************/ 361 418 … … 1030 1087 1031 1088 /* ****************************************************************** 1032 * *1033 * Bitmap helpers *1034 * *1089 * 1090 * Bitmap helpers 1091 * 1035 1092 ********************************************************************/ 1036 1093
Note:
See TracChangeset
for help on using the changeset viewer.