1 | /* $Id: oslibgpi.cpp,v 1.9 2000-11-16 16:34:49 sandervl Exp $ */
|
---|
2 |
|
---|
3 | /*
|
---|
4 | * GPI interface code
|
---|
5 | *
|
---|
6 | * Copyright 1999 Christoph Bratschi (cbratschi@datacomm.ch)
|
---|
7 | *
|
---|
8 | * Project Odin Software License can be found in LICENSE.TXT
|
---|
9 | *
|
---|
10 | */
|
---|
11 |
|
---|
12 | #define INCL_GPI
|
---|
13 | #define INCL_WIN
|
---|
14 | #include <os2wrap.h> //Odin32 OS/2 api wrappers
|
---|
15 | #include <stdlib.h>
|
---|
16 | #include <string.h>
|
---|
17 | #include <math.h>
|
---|
18 | #include "win32type.h"
|
---|
19 | #include <winconst.h>
|
---|
20 | #include "oslibgpi.h"
|
---|
21 | #include <dcdata.h>
|
---|
22 | #include <misc.h>
|
---|
23 |
|
---|
24 | #define DBG_LOCALLOG DBG_oslibgpi
|
---|
25 | #include "dbglocal.h"
|
---|
26 |
|
---|
27 | #define GetDCData(a) ((pDCData)a)
|
---|
28 |
|
---|
29 | LONG APIENTRY _GpiQueryTabbedTextExtent(HPS hps,LONG lCount,PCH pchString,LONG lTabCount,PULONG puTabStops);
|
---|
30 |
|
---|
31 | inline LONG GpiQueryTabbedTextExtent(HPS hps,LONG lCount,PCH pchString,LONG lTabCount,PULONG puTabStops)
|
---|
32 | {
|
---|
33 | LONG yyrc;
|
---|
34 | USHORT sel = RestoreOS2FS();
|
---|
35 |
|
---|
36 | yyrc = _GpiQueryTabbedTextExtent(hps,lCount,pchString,lTabCount,puTabStops);
|
---|
37 | SetFS(sel);
|
---|
38 |
|
---|
39 | return yyrc;
|
---|
40 | }
|
---|
41 |
|
---|
42 | LONG APIENTRY _GpiTabbedCharStringAt(HPS hps,PPOINTL pPtStart,PRECTL prclRect,ULONG flOptions,LONG lCount,PCH pchString,LONG lTabCount,PULONG puTabStops,LONG lTabOrigin);
|
---|
43 |
|
---|
44 | inline LONG GpiTabbedCharStringAt(HPS hps,PPOINTL pPtStart,PRECTL prclRect,ULONG flOptions,LONG lCount,PCH pchString,LONG lTabCount,PULONG puTabStops,LONG lTabOrigin)
|
---|
45 | {
|
---|
46 | LONG yyrc;
|
---|
47 | USHORT sel = RestoreOS2FS();
|
---|
48 |
|
---|
49 | yyrc = _GpiTabbedCharStringAt(hps,pPtStart,prclRect,flOptions,lCount,pchString,lTabCount,puTabStops,lTabOrigin);
|
---|
50 | SetFS(sel);
|
---|
51 |
|
---|
52 | return yyrc;
|
---|
53 | }
|
---|
54 |
|
---|
55 | LONG APIENTRY WinDrawTabbedText(HPS hps,LONG cchText,LONG lTabWidth,PCH lpchText,PRECTL prcl,LONG clrFore,LONG clrBack,ULONG flCmd);
|
---|
56 |
|
---|
57 | inline LONG _WinDrawTabbedText(HPS hps,LONG cchText,LONG lTabWidth,PCH lpchText,PRECTL prcl,LONG clrFore,LONG clrBack,ULONG flCmd)
|
---|
58 | {
|
---|
59 | LONG yyrc;
|
---|
60 | USHORT sel = RestoreOS2FS();
|
---|
61 |
|
---|
62 | yyrc = WinDrawTabbedText(hps,cchText,lTabWidth,lpchText,prcl,clrFore,clrBack,flCmd);
|
---|
63 | SetFS(sel);
|
---|
64 |
|
---|
65 | return yyrc;
|
---|
66 | }
|
---|
67 |
|
---|
68 | #undef WinDrawTabbedText
|
---|
69 | #define WinDrawTabbedText _WinDrawTabbedText
|
---|
70 |
|
---|
71 | void inline swap(LONG &a,LONG &b)
|
---|
72 | {
|
---|
73 | LONG temp = a;
|
---|
74 |
|
---|
75 | a = b;
|
---|
76 | b = temp;
|
---|
77 | }
|
---|
78 |
|
---|
79 | void inline swap(int &a,int &b)
|
---|
80 | {
|
---|
81 | int temp = a;
|
---|
82 |
|
---|
83 | a = b;
|
---|
84 | b = temp;
|
---|
85 | }
|
---|
86 |
|
---|
87 | void inline sortAscending(LONG &a,LONG &b)
|
---|
88 | {
|
---|
89 | if (a > b) swap(a,b);
|
---|
90 | }
|
---|
91 |
|
---|
92 | void inline sortAscending(int &a,int &b)
|
---|
93 | {
|
---|
94 | if (a > b) swap(a,b);
|
---|
95 | }
|
---|
96 |
|
---|
97 | void inline sortAscending(POINTLOS2 &a,POINTLOS2 &b)
|
---|
98 | {
|
---|
99 | sortAscending(a.x,b.x);
|
---|
100 | sortAscending(a.y,b.y);
|
---|
101 | }
|
---|
102 |
|
---|
103 | BOOL excludeBottomRightPoint(PVOID pHps,PPOINTLOS2 pptl)
|
---|
104 | {
|
---|
105 | sortAscending(pptl[0],pptl[1]);
|
---|
106 |
|
---|
107 | if (GetDCData(pHps)->graphicsMode != GM_COMPATIBLE_W)
|
---|
108 | {
|
---|
109 | return TRUE;
|
---|
110 | }
|
---|
111 |
|
---|
112 | if (pptl[0].x == pptl[1].x || pptl[0].y == pptl[1].y)
|
---|
113 | {
|
---|
114 | return FALSE;
|
---|
115 | }
|
---|
116 |
|
---|
117 | if (abs((int)GetDCData(pHps)->viewportXExt) <= abs((int)GetDCData(pHps)->windowExt.cx))
|
---|
118 | {
|
---|
119 | if (GetDCData(pHps)->isLeftLeft)
|
---|
120 | pptl[1].x -= abs(GetDCData(pHps)->worldXDeltaFor1Pixel);
|
---|
121 | else
|
---|
122 | pptl[0].x += abs(GetDCData(pHps)->worldXDeltaFor1Pixel);
|
---|
123 | }
|
---|
124 |
|
---|
125 | if (abs((int)GetDCData(pHps)->viewportYExt) <= abs((int)GetDCData(pHps)->windowExt.cy))
|
---|
126 | {
|
---|
127 | if (GetDCData(pHps)->isTopTop)
|
---|
128 | pptl[1].y -= abs(GetDCData(pHps)->worldYDeltaFor1Pixel);
|
---|
129 | else
|
---|
130 | pptl[0].y += abs(GetDCData(pHps)->worldYDeltaFor1Pixel);
|
---|
131 | }
|
---|
132 |
|
---|
133 | sortAscending(pptl[0], pptl[1]);
|
---|
134 |
|
---|
135 | return TRUE;
|
---|
136 | }
|
---|
137 |
|
---|
138 | BOOL includeBottomRightPoint(PVOID pHps,PPOINTLOS2 pptl)
|
---|
139 | {
|
---|
140 | if(GetDCData(pHps)->graphicsMode != GM_COMPATIBLE_W)
|
---|
141 | {
|
---|
142 | return TRUE; // already inclusive/inclusive
|
---|
143 | }
|
---|
144 |
|
---|
145 | if(pptl[0].x == pptl[1].x || pptl[0].y == pptl[1].y)
|
---|
146 | {
|
---|
147 | return FALSE; // empty rectangle
|
---|
148 | }
|
---|
149 |
|
---|
150 | if(GetDCData(pHps)->isLeftLeft)
|
---|
151 | {
|
---|
152 | pptl[1].x += abs(GetDCData(pHps)->worldXDeltaFor1Pixel);
|
---|
153 | sortAscending(pptl[0].x, pptl[1].x);
|
---|
154 | }
|
---|
155 | else
|
---|
156 | {
|
---|
157 | pptl[0].x -= abs(GetDCData(pHps)->worldXDeltaFor1Pixel);
|
---|
158 | sortAscending(pptl[1].x, pptl[0].x);
|
---|
159 | }
|
---|
160 |
|
---|
161 | if(GetDCData(pHps)->isTopTop)
|
---|
162 | {
|
---|
163 | pptl[1].y += abs(GetDCData(pHps)->worldYDeltaFor1Pixel);
|
---|
164 | sortAscending(pptl[1].y, pptl[0].y);
|
---|
165 | }
|
---|
166 | else
|
---|
167 | {
|
---|
168 | pptl[0].y -= abs(GetDCData(pHps)->worldYDeltaFor1Pixel);
|
---|
169 | sortAscending(pptl[0].y, pptl[1].y);
|
---|
170 | }
|
---|
171 | return TRUE;
|
---|
172 | }
|
---|
173 |
|
---|
174 | BOOL getAlignUpdateCP(PVOID pHps)
|
---|
175 | {
|
---|
176 | return GetDCData(pHps)->alignUpdateCP;
|
---|
177 | }
|
---|
178 |
|
---|
179 | INT getWorldYDeltaFor1Pixel(PVOID pHps)
|
---|
180 | {
|
---|
181 | return GetDCData(pHps)->worldYDeltaFor1Pixel;
|
---|
182 | }
|
---|
183 |
|
---|
184 | INT getWorldXDeltaFor1Pixel(PVOID pHps)
|
---|
185 | {
|
---|
186 | return GetDCData(pHps)->worldXDeltaFor1Pixel;
|
---|
187 | }
|
---|
188 |
|
---|
189 | BOOL getInPath(PVOID pHps)
|
---|
190 | {
|
---|
191 | return GetDCData(pHps)->inPath;
|
---|
192 | }
|
---|
193 |
|
---|
194 | VOID setInPath(PVOID pHps,BOOL inPath)
|
---|
195 | {
|
---|
196 | GetDCData(pHps)->inPath = inPath;
|
---|
197 | }
|
---|
198 |
|
---|
199 | BOOL getIsWideLine(PVOID pHps)
|
---|
200 | {
|
---|
201 | return GetDCData(pHps)->isWideLine;
|
---|
202 | }
|
---|
203 |
|
---|
204 | BOOL getIsTopTop(PVOID pHps)
|
---|
205 | {
|
---|
206 | return GetDCData(pHps)->isTopTop;
|
---|
207 | }
|
---|
208 |
|
---|
209 | ULONG getMapMode(PVOID pHps)
|
---|
210 | {
|
---|
211 | return GetDCData(pHps)->MapMode;
|
---|
212 | }
|
---|
213 |
|
---|
214 | BOOL OSLibGpiQueryCurrentPosition(PVOID pHps,PPOINTLOS2 ptl)
|
---|
215 | {
|
---|
216 | return GpiQueryCurrentPosition(GetDCData(pHps)->hps,(PPOINTL)ptl);
|
---|
217 | }
|
---|
218 |
|
---|
219 | BOOL OSLibGpiSetCurrentPosition(PVOID pHps,PPOINTLOS2 ptl)
|
---|
220 | {
|
---|
221 | return GpiSetCurrentPosition(GetDCData(pHps)->hps,(PPOINTL)ptl);
|
---|
222 | }
|
---|
223 |
|
---|
224 | BOOL OSLibGpiCharStringPosAt(PVOID pHps,PPOINTLOS2 ptl,PRECTLOS2 rct,ULONG flOptions,LONG lCount,LPCSTR pchString,CONST INT *alAdx)
|
---|
225 | {
|
---|
226 | return GpiCharStringPosAt(GetDCData(pHps)->hps,(PPOINTL)ptl,(PRECTL)rct,flOptions,lCount,(PCH)pchString,(PLONG)alAdx);
|
---|
227 | }
|
---|
228 |
|
---|
229 | BOOL OSLibGpiQueryCharStringPosAt(PVOID pHps,PPOINTLOS2 ptl,ULONG flOptions,LONG lCount,LPCSTR pchString,CONST INT *alAdx,PPOINTLOS2 aptlPos)
|
---|
230 | {
|
---|
231 | return GpiQueryCharStringPosAt(GetDCData(pHps)->hps,(PPOINTL)ptl,flOptions,lCount,(PCH)pchString,(PLONG)alAdx,(PPOINTL)aptlPos);
|
---|
232 | }
|
---|
233 |
|
---|
234 | BOOL OSLibGpiSetTextAlignment(PVOID pHps,LONG lHoriz,LONG lVert)
|
---|
235 | {
|
---|
236 | return GpiSetTextAlignment(GetDCData(pHps)->hps,lHoriz,lVert);
|
---|
237 | }
|
---|
238 |
|
---|
239 | BOOL OSLibGpiQueryTextAlignment(PVOID pHps,PLONG plHoriz,PLONG plVert)
|
---|
240 | {
|
---|
241 | return GpiQueryTextAlignment(GetDCData(pHps)->hps,plHoriz,plVert);
|
---|
242 | }
|
---|
243 |
|
---|
244 | LONG OSLibGpiQueryTabbedTextExtent(pDCData pHps,INT lCount,LPCSTR pchString,INT lTabCount,PINT puTabStops)
|
---|
245 | {
|
---|
246 | return GpiQueryTabbedTextExtent(pHps->hps,lCount,(PCH)pchString,lTabCount,(PULONG)puTabStops);
|
---|
247 | }
|
---|
248 |
|
---|
249 | LONG OSLibGpiTabbedCharStringAt(PVOID pHps,PPOINTLOS2 pPtStart,PRECTLOS2 prclRect,ULONG flOptions,INT lCount,LPCSTR pchString,INT lTabCount,PINT puTabStops,INT lTabOrigin)
|
---|
250 | {
|
---|
251 | return GpiTabbedCharStringAt(GetDCData(pHps)->hps,(PPOINTL)pPtStart,(PRECTL)prclRect,flOptions,lCount,(PCH)pchString,lTabCount,(PULONG)puTabStops,lTabOrigin);
|
---|
252 | }
|
---|
253 |
|
---|
254 | BOOL OSLibGpiQueryTextBox(pDCData pHps,LONG lCount1,LPCSTR pchString,LONG lCount2,PPOINTLOS2 aptlPoints)
|
---|
255 | {
|
---|
256 | return GpiQueryTextBox(pHps->hps,lCount1,(PCH)pchString,lCount2,(PPOINTL)aptlPoints);
|
---|
257 | }
|
---|
258 |
|
---|
259 | VOID calcDimensions(POINTLOS2 box[],PPOINTLOS2 point)
|
---|
260 | {
|
---|
261 | ULONG cx;
|
---|
262 | ULONG cy;
|
---|
263 |
|
---|
264 | if (box[TXTBOX_BOTTOMLEFT].y == box[TXTBOX_BOTTOMRIGHT].y)
|
---|
265 | {
|
---|
266 | point->y = labs (box[TXTBOX_BOTTOMLEFT].y-box[TXTBOX_TOPLEFT].y);
|
---|
267 | point->x = labs (box[TXTBOX_BOTTOMRIGHT].x-box[TXTBOX_BOTTOMLEFT].x);
|
---|
268 |
|
---|
269 | if (box[TXTBOX_BOTTOMLEFT].x != box[TXTBOX_TOPLEFT].x)
|
---|
270 | {
|
---|
271 | if (point->y < 25)
|
---|
272 | cx = 2;
|
---|
273 | else
|
---|
274 | cx = ((point->y*10)+50)/100;
|
---|
275 | point->x += cx;
|
---|
276 | }
|
---|
277 | } else
|
---|
278 | {
|
---|
279 | cx = labs (box[TXTBOX_BOTTOMLEFT].x-box[TXTBOX_TOPLEFT].x);
|
---|
280 | cy = labs (box[TXTBOX_BOTTOMLEFT].y-box[TXTBOX_TOPLEFT].y);
|
---|
281 | point->y = (ULONG)hypot(cx,cy);
|
---|
282 |
|
---|
283 | cx = labs (box[TXTBOX_TOPRIGHT].x-box[TXTBOX_TOPLEFT].x);
|
---|
284 | cy = labs (box[TXTBOX_TOPRIGHT].y-box[TXTBOX_TOPLEFT].y);
|
---|
285 | point->x = (ULONG)hypot(cx,cy);
|
---|
286 | }
|
---|
287 | }
|
---|
288 |
|
---|
289 | LONG OSLibGpiQueryBackMix(PVOID pHps)
|
---|
290 | {
|
---|
291 | return GpiQueryBackMix(GetDCData(pHps)->hps);
|
---|
292 | }
|
---|
293 |
|
---|
294 | BOOL doesYAxisGrowNorth(PVOID pHps)
|
---|
295 | {
|
---|
296 | if ((GetDCData(pHps)->windowExt.cy < 0 && GetDCData(pHps)->viewportYExt > 0.0) ||
|
---|
297 | (GetDCData(pHps)->windowExt.cy > 0 && GetDCData(pHps)->viewportYExt < 0.0))
|
---|
298 | {
|
---|
299 | if (GetDCData(pHps)->graphicsMode == GM_COMPATIBLE_W ||
|
---|
300 | (GetDCData(pHps)->graphicsMode == GM_ADVANCED_W && GetDCData(pHps)->xform.eM22 >= 0.0))
|
---|
301 | return TRUE;
|
---|
302 | } else
|
---|
303 | {
|
---|
304 | if (GetDCData(pHps)->graphicsMode == GM_ADVANCED_W && GetDCData(pHps)->xform.eM22 < 0.0)
|
---|
305 | return TRUE;
|
---|
306 | }
|
---|
307 |
|
---|
308 | return FALSE;
|
---|
309 | }
|
---|
310 |
|
---|
311 | LONG OSLibWinDrawTabbedText(PVOID pHps,LONG cchText,LONG lTabs,LPCSTR lpchText,PVOID prcl,LONG clrFore,LONG clrBack,ULONG flCmd)
|
---|
312 | {
|
---|
313 | return WinDrawTabbedText(GetDCData(pHps)->hps,cchText,lTabs,(PCH)lpchText,(PRECTL)prcl,clrFore,clrBack,flCmd);
|
---|
314 | }
|
---|
315 |
|
---|
316 | BOOL OSLibGpiMove(PVOID pHps,PPOINTLOS2 pptlPoint)
|
---|
317 | {
|
---|
318 | return GpiMove(GetDCData(pHps)->hps,(PPOINTL)pptlPoint);
|
---|
319 | }
|
---|
320 |
|
---|
321 | LONG OSLibGpiLine(PVOID pHps,PPOINTLOS2 pptlEndPoint)
|
---|
322 | {
|
---|
323 | return GpiLine(GetDCData(pHps)->hps,(PPOINTL)pptlEndPoint);
|
---|
324 | }
|
---|
325 |
|
---|
326 | #define FSP_ENDPATH 0x00000010
|
---|
327 | #define FSP_FILL 0x00000020
|
---|
328 | #define FSP_CLOSEPATH 0x00000040
|
---|
329 |
|
---|
330 | BOOL APIENTRY _PaxStrokeAndFillPath(HPS hPS,ULONG ulAction,ULONG ulStrokeAttrs,PAREABUNDLE pPenStroke);
|
---|
331 |
|
---|
332 | inline BOOL PaxStrokeAndFillPath(HPS hPS,ULONG ulAction,ULONG ulStrokeAttrs,PAREABUNDLE pPenStroke)
|
---|
333 | {
|
---|
334 | BOOL yyrc;
|
---|
335 | USHORT sel = RestoreOS2FS();
|
---|
336 |
|
---|
337 | yyrc = _PaxStrokeAndFillPath(hPS,ulAction,ulStrokeAttrs,pPenStroke);
|
---|
338 | SetFS(sel);
|
---|
339 |
|
---|
340 | return yyrc;
|
---|
341 | }
|
---|
342 |
|
---|
343 |
|
---|
344 | BOOL OSLibGpiEndPath(PVOID pHps)
|
---|
345 | {
|
---|
346 | return GpiEndPath(GetDCData(pHps)->hps);
|
---|
347 | }
|
---|
348 |
|
---|
349 | BOOL drawLinePointCircle(PVOID pHps,INT width,INT height,LONG color)
|
---|
350 | {
|
---|
351 | ARCPARAMS arcp;
|
---|
352 | BOOL rc = TRUE;
|
---|
353 |
|
---|
354 | arcp.lP = 1;
|
---|
355 | arcp.lQ = 1;
|
---|
356 | arcp.lR = 0;
|
---|
357 | arcp.lS = 0;
|
---|
358 | if (!GpiSetArcParams(GetDCData(pHps)->hps,&arcp))
|
---|
359 | return FALSE;
|
---|
360 |
|
---|
361 | AREABUNDLE newAreaBundle, oldAreaBundle;
|
---|
362 | LINEBUNDLE lineBundle;
|
---|
363 |
|
---|
364 | GpiQueryAttrs(GetDCData(pHps)->hps,PRIM_AREA,ABB_COLOR | ABB_MIX_MODE | ABB_SET | ABB_SYMBOL,(PBUNDLE)&oldAreaBundle);
|
---|
365 | GpiQueryAttrs(GetDCData(pHps)->hps,PRIM_LINE,LBB_MIX_MODE, (PBUNDLE)&lineBundle);
|
---|
366 |
|
---|
367 | newAreaBundle = oldAreaBundle;
|
---|
368 | newAreaBundle.lColor = color;
|
---|
369 | newAreaBundle.usMixMode = lineBundle.usMixMode;
|
---|
370 | newAreaBundle.usSet = LCID_DEFAULT;
|
---|
371 | newAreaBundle.usSymbol = PATSYM_SOLID;
|
---|
372 |
|
---|
373 | if (!GpiSetAttrs(GetDCData(pHps)->hps,PRIM_AREA,ABB_COLOR | ABB_MIX_MODE | ABB_SET | ABB_SYMBOL,0,(PBUNDLE)&newAreaBundle))
|
---|
374 | return FALSE;
|
---|
375 |
|
---|
376 | if (GpiFullArc(GetDCData(pHps)->hps,DRO_FILL,MAKEFIXED((width-1)>>1,0)) == GPI_ERROR)
|
---|
377 | rc = FALSE;
|
---|
378 | GpiSetAttrs(GetDCData(pHps)->hps,PRIM_AREA,ABB_COLOR | ABB_MIX_MODE | ABB_SET | ABB_SYMBOL,0,(PBUNDLE)&oldAreaBundle);
|
---|
379 |
|
---|
380 | return rc;
|
---|
381 | }
|
---|
382 |
|
---|
383 | BOOL drawLinePoint(PVOID pHps,PPOINTLOS2 pt,LONG color)
|
---|
384 | {
|
---|
385 | LINEBUNDLE lbOld, lbNew;
|
---|
386 | LONG defaults = GpiQueryAttrs(GetDCData(pHps)->hps, PRIM_LINE, LBB_COLOR, &lbOld);
|
---|
387 |
|
---|
388 | lbNew.lColor = color;
|
---|
389 | BOOL rc = GpiSetAttrs(GetDCData(pHps)->hps,PRIM_LINE,LBB_COLOR,0,&lbNew) && GpiSetPel(GetDCData(pHps)->hps,(PPOINTL)pt) != GPI_ERROR;
|
---|
390 |
|
---|
391 | GpiSetAttrs(GetDCData(pHps)->hps,PRIM_LINE,LBB_COLOR,defaults,&lbOld);
|
---|
392 |
|
---|
393 | return rc;
|
---|
394 | }
|
---|
395 |
|
---|
396 | ULONG OSLibGpiQueryCp(HDC hdc)
|
---|
397 | {
|
---|
398 | return GpiQueryCp(hdc);
|
---|
399 | }
|
---|
400 |
|
---|
401 | BOOL OSLibGpiSetCp(HDC hdc, ULONG codepage)
|
---|
402 | {
|
---|
403 | return GpiSetCp(hdc, codepage);
|
---|
404 | }
|
---|
405 |
|
---|
406 |
|
---|
407 | int OSLibGpiQueryFontMaxHeight(HDC hdc)
|
---|
408 | {
|
---|
409 | FONTMETRICS metrics;
|
---|
410 | BOOL rc;
|
---|
411 |
|
---|
412 | rc = GpiQueryFontMetrics(hdc, sizeof(metrics), &metrics);
|
---|
413 | if(rc) {
|
---|
414 | return metrics.lMaxAscender;
|
---|
415 | }
|
---|
416 | else {
|
---|
417 | dprintf(("GpiQueryFontMetrics returned FALSE!!"));
|
---|
418 | return 0;
|
---|
419 | }
|
---|
420 | }
|
---|
421 |
|
---|
422 | #ifdef DEBUG
|
---|
423 | void dprintfOrigin(HDC hdc)
|
---|
424 | {
|
---|
425 | POINTL point;
|
---|
426 |
|
---|
427 | pDCData pHps = (pDCData)OSLibGpiQueryDCData((HPS)hdc);
|
---|
428 | if(!pHps)
|
---|
429 | {
|
---|
430 | return;
|
---|
431 | }
|
---|
432 |
|
---|
433 | GreGetDCOrigin(pHps->hps, &point);
|
---|
434 | dprintf2(("HDC origin (%d,%d) org (%d,%d)", point.x, point.y, pHps->ptlOrigin.x, pHps->ptlOrigin.y));
|
---|
435 | }
|
---|
436 | #endif
|
---|
437 |
|
---|
438 | BOOL OSLibDevQueryCaps(pDCData pHps, LONG lStart, LONG lCount, LONG *alArray)
|
---|
439 | {
|
---|
440 | return DevQueryCaps(pHps->hdc, lStart, lCount, alArray);
|
---|
441 | }
|
---|