1 /* DPSOperators - Drawing engine operators that require context
2
3 Copyright (C) 1999 Free Software Foundation, Inc.
4 Written by: Richard Frith-Macdonald <richard@brainstorm.co.uk>
5 Based on code by Adam Fedor
6 Date: Feb 1999
7
8 This file is part of the GNU Objective C User Interface library.
9
10 This library is free software; you can redistribute it and/or
11 modify it under the terms of the GNU Lesser General Public
12 License as published by the Free Software Foundation; either
13 version 2 of the License, or (at your option) any later version.
14
15 This library is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 Lesser General Public License for more details.
19
20 You should have received a copy of the GNU Lesser General Public
21 License along with this library; see the file COPYING.LIB.
22 If not, see <http://www.gnu.org/licenses/> or write to the
23 Free Software Foundation, 51 Franklin Street, Fifth Floor,
24 Boston, MA 02110-1301, USA.
25 */
26
27 #ifndef _DPSOperators_h_INCLUDE
28 #define _DPSOperators_h_INCLUDE
29 #import <GNUstepBase/GSVersionMacros.h>
30
31 #import <AppKit/NSGraphicsContext.h>
32
33 #define GSCTXT NSGraphicsContext
34
35 /* ----------------------------------------------------------------------- */
36 /* Color operations */
37 /* ----------------------------------------------------------------------- */
38 static inline void
39 DPScurrentalpha(GSCTXT *ctxt, CGFloat* a)
40 __attribute__((unused));
41
42 static inline void
43 DPScurrentcmykcolor(GSCTXT *ctxt, CGFloat* c, CGFloat* m, CGFloat* y, CGFloat* k)
44 __attribute__((unused));
45
46 static inline void
47 DPScurrentgray(GSCTXT *ctxt, CGFloat* gray)
48 __attribute__((unused));
49
50 static inline void
51 DPScurrenthsbcolor(GSCTXT *ctxt, CGFloat* h, CGFloat* s, CGFloat* b)
52 __attribute__((unused));
53
54 static inline void
55 DPScurrentrgbcolor(GSCTXT *ctxt, CGFloat* r, CGFloat* g, CGFloat* b)
56 __attribute__((unused));
57
58 static inline void
59 DPSsetalpha(GSCTXT *ctxt, CGFloat a)
60 __attribute__((unused));
61
62 static inline void
63 DPSsetcmykcolor(GSCTXT *ctxt, CGFloat c, CGFloat m, CGFloat y, CGFloat k)
64 __attribute__((unused));
65
66 static inline void
67 DPSsetgray(GSCTXT *ctxt, CGFloat gray)
68 __attribute__((unused));
69
70 static inline void
71 DPSsethsbcolor(GSCTXT *ctxt, CGFloat h, CGFloat s, CGFloat b)
72 __attribute__((unused));
73
74 static inline void
75 DPSsetrgbcolor(GSCTXT *ctxt, CGFloat r, CGFloat g, CGFloat b)
76 __attribute__((unused));
77
78
79 static inline void
80 GSSetFillColorspace(GSCTXT *ctxt, NSDictionary * dict)
81 __attribute__((unused));
82
83 static inline void
84 GSSetStrokeColorspace(GSCTXT *ctxt, NSDictionary * dict)
85 __attribute__((unused));
86
87 static inline void
88 GSSetFillColor(GSCTXT *ctxt, CGFloat * values)
89 __attribute__((unused));
90
91 static inline void
92 GSSetStrokeColor(GSCTXT *ctxt, CGFloat * values)
93 __attribute__((unused));
94
95
96 /* ----------------------------------------------------------------------- */
97 /* Text operations */
98 /* ----------------------------------------------------------------------- */
99 static inline void
100 DPSashow(GSCTXT *ctxt, CGFloat x, CGFloat y, const char* s)
101 __attribute__((unused));
102
103 static inline void
104 DPSawidthshow(GSCTXT *ctxt, CGFloat cx, CGFloat cy, int c, CGFloat ax, CGFloat ay, const char* s)
105 __attribute__((unused));
106
107 static inline void
108 DPScharpath(GSCTXT *ctxt, const char* s, int b)
109 __attribute__((unused));
110
111 static inline void
112 DPSshow(GSCTXT *ctxt, const char* s)
113 __attribute__((unused));
114
115 static inline void
116 DPSwidthshow(GSCTXT *ctxt, CGFloat x, CGFloat y, int c, const char* s)
117 __attribute__((unused));
118
119 static inline void
120 DPSxshow(GSCTXT *ctxt, const char* s, const CGFloat* numarray, int size)
121 __attribute__((unused));
122
123 static inline void
124 DPSxyshow(GSCTXT *ctxt, const char* s, const CGFloat* numarray, int size)
125 __attribute__((unused));
126
127 static inline void
128 DPSyshow(GSCTXT *ctxt, const char* s, const CGFloat* numarray, int size)
129 __attribute__((unused));
130
131
132 static inline void
133 GSSetCharacterSpacing(GSCTXT *ctxt, CGFloat extra)
134 __attribute__((unused));
135
136 static inline void
137 GSSetFont(GSCTXT *ctxt, NSFont* font)
138 __attribute__((unused));
139
140 static inline void
141 GSSetFontSize(GSCTXT *ctxt, CGFloat size)
142 __attribute__((unused));
143
144 static inline NSAffineTransform *
145 GSGetTextCTM(GSCTXT *ctxt)
146 __attribute__((unused));
147
148 static inline NSPoint
149 GSGetTextPosition(GSCTXT *ctxt)
150 __attribute__((unused));
151
152 static inline void
153 GSSetTextCTM(GSCTXT *ctxt, NSAffineTransform * ctm)
154 __attribute__((unused));
155
156 static inline void
157 GSSetTextDrawingMode(GSCTXT *ctxt, GSTextDrawingMode mode)
158 __attribute__((unused));
159
160 static inline void
161 GSSetTextPosition(GSCTXT *ctxt, NSPoint loc)
162 __attribute__((unused));
163
164 static inline void
165 GSShowText(GSCTXT *ctxt, const char * string, size_t length)
166 __attribute__((unused));
167
168 static inline void
169 GSShowGlyphs(GSCTXT *ctxt, const NSGlyph * glyphs, size_t length)
170 __attribute__((unused));
171
172 static inline void
173 GSShowGlyphsWithAdvances(GSCTXT *ctxt, const NSGlyph * glyphs, const NSSize * advances, size_t length)
174 __attribute__((unused));
175
176
177
178 /* ----------------------------------------------------------------------- */
179 /* Gstate Handling */
180 /* ----------------------------------------------------------------------- */
181 static inline void
182 DPSgrestore(GSCTXT *ctxt)
183 __attribute__((unused));
184
185 static inline void
186 DPSgsave(GSCTXT *ctxt)
187 __attribute__((unused));
188
189 static inline void
190 DPSinitgraphics(GSCTXT *ctxt)
191 __attribute__((unused));
192
193 static inline void
194 DPSsetgstate(GSCTXT *ctxt, NSInteger gst)
195 __attribute__((unused));
196
197
198 static inline NSInteger
199 GSDefineGState(GSCTXT *ctxt)
200 __attribute__((unused));
201
202 static inline void
203 GSUndefineGState(GSCTXT *ctxt, NSInteger gst)
204 __attribute__((unused));
205
206 static inline void
207 GSReplaceGState(GSCTXT *ctxt, NSInteger gst)
208 __attribute__((unused));
209
210 /* ----------------------------------------------------------------------- */
211 /* Gstate operations */
212 /* ----------------------------------------------------------------------- */
213 static inline void
214 DPScurrentflat(GSCTXT *ctxt, CGFloat* flatness)
215 __attribute__((unused));
216
217 static inline void
218 DPScurrentlinecap(GSCTXT *ctxt, int* linecap)
219 __attribute__((unused));
220
221 static inline void
222 DPScurrentlinejoin(GSCTXT *ctxt, int* linejoin)
223 __attribute__((unused));
224
225 static inline void
226 DPScurrentlinewidth(GSCTXT *ctxt, CGFloat* width)
227 __attribute__((unused));
228
229 static inline void
230 DPScurrentmiterlimit(GSCTXT *ctxt, CGFloat* limit)
231 __attribute__((unused));
232
233 static inline void
234 DPScurrentpoint(GSCTXT *ctxt, CGFloat* x, CGFloat* y)
235 __attribute__((unused));
236
237 static inline void
238 DPScurrentstrokeadjust(GSCTXT *ctxt, int* b)
239 __attribute__((unused));
240
241 static inline void
242 DPSsetdash(GSCTXT *ctxt, const CGFloat* pat, NSInteger size, CGFloat offset)
243 __attribute__((unused));
244
245 static inline void
246 DPSsetflat(GSCTXT *ctxt, CGFloat flatness)
247 __attribute__((unused));
248
249 static inline void
250 DPSsethalftonephase(GSCTXT *ctxt, CGFloat x, CGFloat y)
251 __attribute__((unused));
252
253 static inline void
254 DPSsetlinecap(GSCTXT *ctxt, int linecap)
255 __attribute__((unused));
256
257 static inline void
258 DPSsetlinejoin(GSCTXT *ctxt, int linejoin)
259 __attribute__((unused));
260
261 static inline void
262 DPSsetlinewidth(GSCTXT *ctxt, CGFloat width)
263 __attribute__((unused));
264
265 static inline void
266 DPSsetmiterlimit(GSCTXT *ctxt, CGFloat limit)
267 __attribute__((unused));
268
269 static inline void
270 DPSsetstrokeadjust(GSCTXT *ctxt, int b)
271 __attribute__((unused));
272
273
274 /* ----------------------------------------------------------------------- */
275 /* Matrix operations */
276 /* ----------------------------------------------------------------------- */
277 static inline void
278 DPSconcat(GSCTXT *ctxt, const CGFloat* m)
279 __attribute__((unused));
280
281 static inline void
282 DPSinitmatrix(GSCTXT *ctxt)
283 __attribute__((unused));
284
285 static inline void
286 DPSrotate(GSCTXT *ctxt, CGFloat angle)
287 __attribute__((unused));
288
289 static inline void
290 DPSscale(GSCTXT *ctxt, CGFloat x, CGFloat y)
291 __attribute__((unused));
292
293 static inline void
294 DPStranslate(GSCTXT *ctxt, CGFloat x, CGFloat y)
295 __attribute__((unused));
296
297
298 static inline NSAffineTransform *
299 GSCurrentCTM(GSCTXT *ctxt)
300 __attribute__((unused));
301
302 static inline void
303 GSSetCTM(GSCTXT *ctxt, NSAffineTransform * ctm)
304 __attribute__((unused));
305
306 static inline void
307 GSConcatCTM(GSCTXT *ctxt, NSAffineTransform * ctm)
308 __attribute__((unused));
309
310
311 /* ----------------------------------------------------------------------- */
312 /* Paint operations */
313 /* ----------------------------------------------------------------------- */
314 static inline void
315 DPSarc(GSCTXT *ctxt, CGFloat x, CGFloat y, CGFloat r, CGFloat angle1, CGFloat angle2)
316 __attribute__((unused));
317
318 static inline void
319 DPSarcn(GSCTXT *ctxt, CGFloat x, CGFloat y, CGFloat r, CGFloat angle1, CGFloat angle2)
320 __attribute__((unused));
321
322 static inline void
323 DPSarct(GSCTXT *ctxt, CGFloat x1, CGFloat y1, CGFloat x2, CGFloat y2, CGFloat r)
324 __attribute__((unused));
325
326 static inline void
327 DPSclip(GSCTXT *ctxt)
328 __attribute__((unused));
329
330 static inline void
331 DPSclosepath(GSCTXT *ctxt)
332 __attribute__((unused));
333
334 static inline void
335 DPScurveto(GSCTXT *ctxt, CGFloat x1, CGFloat y1, CGFloat x2, CGFloat y2, CGFloat x3, CGFloat y3)
336 __attribute__((unused));
337
338 static inline void
339 DPSeoclip(GSCTXT *ctxt)
340 __attribute__((unused));
341
342 static inline void
343 DPSeofill(GSCTXT *ctxt)
344 __attribute__((unused));
345
346 static inline void
347 DPSfill(GSCTXT *ctxt)
348 __attribute__((unused));
349
350 static inline void
351 DPSflattenpath(GSCTXT *ctxt)
352 __attribute__((unused));
353
354 static inline void
355 DPSinitclip(GSCTXT *ctxt)
356 __attribute__((unused));
357
358 static inline void
359 DPSlineto(GSCTXT *ctxt, CGFloat x, CGFloat y)
360 __attribute__((unused));
361
362 static inline void
363 DPSmoveto(GSCTXT *ctxt, CGFloat x, CGFloat y)
364 __attribute__((unused));
365
366 static inline void
367 DPSnewpath(GSCTXT *ctxt)
368 __attribute__((unused));
369
370 static inline void
371 DPSpathbbox(GSCTXT *ctxt, CGFloat* llx, CGFloat* lly, CGFloat* urx, CGFloat* ury)
372 __attribute__((unused));
373
374 static inline void
375 DPSrcurveto(GSCTXT *ctxt, CGFloat x1, CGFloat y1, CGFloat x2, CGFloat y2, CGFloat x3, CGFloat y3)
376 __attribute__((unused));
377
378 static inline void
379 DPSrectclip(GSCTXT *ctxt, CGFloat x, CGFloat y, CGFloat w, CGFloat h)
380 __attribute__((unused));
381
382 static inline void
383 DPSrectfill(GSCTXT *ctxt, CGFloat x, CGFloat y, CGFloat w, CGFloat h)
384 __attribute__((unused));
385
386 static inline void
387 DPSrectstroke(GSCTXT *ctxt, CGFloat x, CGFloat y, CGFloat w, CGFloat h)
388 __attribute__((unused));
389
390 static inline void
391 DPSreversepath(GSCTXT *ctxt)
392 __attribute__((unused));
393
394 static inline void
395 DPSrlineto(GSCTXT *ctxt, CGFloat x, CGFloat y)
396 __attribute__((unused));
397
398 static inline void
399 DPSrmoveto(GSCTXT *ctxt, CGFloat x, CGFloat y)
400 __attribute__((unused));
401
402 static inline void
403 DPSstroke(GSCTXT *ctxt)
404 __attribute__((unused));
405
406 static inline void
407 DPSshfill(GSCTXT *ctxt, NSDictionary *shaderDictionary)
408 __attribute__((unused));
409
410
411 static inline void
412 GSSendBezierPath(GSCTXT *ctxt, NSBezierPath * path)
413 __attribute__((unused));
414
415 static inline void
416 GSRectClipList(GSCTXT *ctxt, const NSRect * rects, int count)
417 __attribute__((unused));
418
419 static inline void
420 GSRectFillList(GSCTXT *ctxt, const NSRect * rects, int count)
421 __attribute__((unused));
422
423
424 /* ----------------------------------------------------------------------- */
425 /* Window system ops */
426 /* ----------------------------------------------------------------------- */
427 static inline void
428 GSCurrentDevice(GSCTXT *ctxt, void** device, int* x, int* y)
429 __attribute__((unused));
430
431 static inline void
432 DPScurrentoffset(GSCTXT *ctxt, int* x, int* y)
433 __attribute__((unused));
434
435 static inline void
436 GSSetDevice(GSCTXT *ctxt, void* device, int x, int y)
437 __attribute__((unused));
438
439 static inline void
440 DPSsetoffset(GSCTXT *ctxt, short int x, short int y)
441 __attribute__((unused));
442
443
444 /*-------------------------------------------------------------------------*/
445 /* Graphics Extensions Ops */
446 /*-------------------------------------------------------------------------*/
447 static inline void
448 DPScomposite(GSCTXT *ctxt, CGFloat x, CGFloat y, CGFloat w, CGFloat h, NSInteger gstateNum, CGFloat dx, CGFloat dy, NSCompositingOperation op)
449 __attribute__((unused));
450
451 static inline void
452 DPScompositerect(GSCTXT *ctxt, CGFloat x, CGFloat y, CGFloat w, CGFloat h, NSCompositingOperation op)
453 __attribute__((unused));
454
455 static inline void
456 DPSdissolve(GSCTXT *ctxt, CGFloat x, CGFloat y, CGFloat w, CGFloat h, NSInteger gstateNum, CGFloat dx, CGFloat dy, CGFloat delta)
457 __attribute__((unused));
458
459
460 static inline void
461 GSDrawImage(GSCTXT *ctxt, NSRect rect, void * imageref)
462 __attribute__((unused));
463
464 /* ----------------------------------------------------------------------- */
465 /* Postscript Client functions */
466 /* ----------------------------------------------------------------------- */
467 static void
468 DPSPrintf(GSCTXT *ctxt, const char * fmt, ...)
469 __attribute__((unused));
470
471 static inline void
472 DPSWriteData(GSCTXT *ctxt, const char * buf, unsigned int count)
473 __attribute__((unused));
474
475 /* ----------------------------------------------------------------------- */
476 /* Color operations */
477 /* ----------------------------------------------------------------------- */
478 static inline void
DPScurrentalpha(GSCTXT * ctxt,CGFloat * a)479 DPScurrentalpha(GSCTXT *ctxt, CGFloat* a)
480 {
481 (ctxt->methods->DPScurrentalpha_)
482 (ctxt, @selector(DPScurrentalpha:), a);
483 }
484
485 static inline void
DPScurrentcmykcolor(GSCTXT * ctxt,CGFloat * c,CGFloat * m,CGFloat * y,CGFloat * k)486 DPScurrentcmykcolor(GSCTXT *ctxt, CGFloat* c, CGFloat* m, CGFloat* y, CGFloat* k)
487 {
488 (ctxt->methods->DPScurrentcmykcolor____)
489 (ctxt, @selector(DPScurrentcmykcolor: : : :), c, m, y, k);
490 }
491
492 static inline void
DPScurrentgray(GSCTXT * ctxt,CGFloat * gray)493 DPScurrentgray(GSCTXT *ctxt, CGFloat* gray)
494 {
495 (ctxt->methods->DPScurrentgray_)
496 (ctxt, @selector(DPScurrentgray:), gray);
497 }
498
499 static inline void
DPScurrenthsbcolor(GSCTXT * ctxt,CGFloat * h,CGFloat * s,CGFloat * b)500 DPScurrenthsbcolor(GSCTXT *ctxt, CGFloat* h, CGFloat* s, CGFloat* b)
501 {
502 (ctxt->methods->DPScurrenthsbcolor___)
503 (ctxt, @selector(DPScurrenthsbcolor: : :), h, s, b);
504 }
505
506 static inline void
DPScurrentrgbcolor(GSCTXT * ctxt,CGFloat * r,CGFloat * g,CGFloat * b)507 DPScurrentrgbcolor(GSCTXT *ctxt, CGFloat* r, CGFloat* g, CGFloat* b)
508 {
509 (ctxt->methods->DPScurrentrgbcolor___)
510 (ctxt, @selector(DPScurrentrgbcolor: : :), r, g, b);
511 }
512
513 static inline void
DPSsetalpha(GSCTXT * ctxt,CGFloat a)514 DPSsetalpha(GSCTXT *ctxt, CGFloat a)
515 {
516 (ctxt->methods->DPSsetalpha_)
517 (ctxt, @selector(DPSsetalpha:), a);
518 }
519
520 static inline void
DPSsetcmykcolor(GSCTXT * ctxt,CGFloat c,CGFloat m,CGFloat y,CGFloat k)521 DPSsetcmykcolor(GSCTXT *ctxt, CGFloat c, CGFloat m, CGFloat y, CGFloat k)
522 {
523 (ctxt->methods->DPSsetcmykcolor____)
524 (ctxt, @selector(DPSsetcmykcolor: : : :), c, m, y, k);
525 }
526
527 static inline void
DPSsetgray(GSCTXT * ctxt,CGFloat gray)528 DPSsetgray(GSCTXT *ctxt, CGFloat gray)
529 {
530 (ctxt->methods->DPSsetgray_)
531 (ctxt, @selector(DPSsetgray:), gray);
532 }
533
534 static inline void
DPSsethsbcolor(GSCTXT * ctxt,CGFloat h,CGFloat s,CGFloat b)535 DPSsethsbcolor(GSCTXT *ctxt, CGFloat h, CGFloat s, CGFloat b)
536 {
537 (ctxt->methods->DPSsethsbcolor___)
538 (ctxt, @selector(DPSsethsbcolor: : :), h, s, b);
539 }
540
541 static inline void
DPSsetrgbcolor(GSCTXT * ctxt,CGFloat r,CGFloat g,CGFloat b)542 DPSsetrgbcolor(GSCTXT *ctxt, CGFloat r, CGFloat g, CGFloat b)
543 {
544 (ctxt->methods->DPSsetrgbcolor___)
545 (ctxt, @selector(DPSsetrgbcolor: : :), r, g, b);
546 }
547
548
549 static inline void
GSSetFillColorspace(GSCTXT * ctxt,NSDictionary * dict)550 GSSetFillColorspace(GSCTXT *ctxt, NSDictionary * dict)
551 {
552 (ctxt->methods->GSSetFillColorspace_)
553 (ctxt, @selector(GSSetFillColorspace:), dict);
554 }
555
556 static inline void
GSSetStrokeColorspace(GSCTXT * ctxt,NSDictionary * dict)557 GSSetStrokeColorspace(GSCTXT *ctxt, NSDictionary * dict)
558 {
559 (ctxt->methods->GSSetStrokeColorspace_)
560 (ctxt, @selector(GSSetStrokeColorspace:), dict);
561 }
562
563 static inline void
GSSetFillColor(GSCTXT * ctxt,CGFloat * values)564 GSSetFillColor(GSCTXT *ctxt, CGFloat * values)
565 {
566 (ctxt->methods->GSSetFillColor_)
567 (ctxt, @selector(GSSetFillColor:), values);
568 }
569
570 static inline void
GSSetStrokeColor(GSCTXT * ctxt,CGFloat * values)571 GSSetStrokeColor(GSCTXT *ctxt, CGFloat * values)
572 {
573 (ctxt->methods->GSSetStrokeColor_)
574 (ctxt, @selector(GSSetStrokeColor:), values);
575 }
576
577
578 /* ----------------------------------------------------------------------- */
579 /* Text operations */
580 /* ----------------------------------------------------------------------- */
581 static inline void
DPSashow(GSCTXT * ctxt,CGFloat x,CGFloat y,const char * s)582 DPSashow(GSCTXT *ctxt, CGFloat x, CGFloat y, const char* s)
583 {
584 (ctxt->methods->DPSashow___)
585 (ctxt, @selector(DPSashow: : :), x, y, s);
586 }
587
588 static inline void
DPSawidthshow(GSCTXT * ctxt,CGFloat cx,CGFloat cy,int c,CGFloat ax,CGFloat ay,const char * s)589 DPSawidthshow(GSCTXT *ctxt, CGFloat cx, CGFloat cy, int c, CGFloat ax, CGFloat ay, const char* s)
590 {
591 (ctxt->methods->DPSawidthshow______)
592 (ctxt, @selector(DPSawidthshow: : : : : :), cx, cy, c, ax, ay, s);
593 }
594
595 static inline void
DPScharpath(GSCTXT * ctxt,const char * s,int b)596 DPScharpath(GSCTXT *ctxt, const char* s, int b)
597 {
598 (ctxt->methods->DPScharpath__)
599 (ctxt, @selector(DPScharpath: :), s, b);
600 }
601
602 static inline void
DPSshow(GSCTXT * ctxt,const char * s)603 DPSshow(GSCTXT *ctxt, const char* s)
604 {
605 (ctxt->methods->DPSshow_)
606 (ctxt, @selector(DPSshow:), s);
607 }
608
609 static inline void
DPSwidthshow(GSCTXT * ctxt,CGFloat x,CGFloat y,int c,const char * s)610 DPSwidthshow(GSCTXT *ctxt, CGFloat x, CGFloat y, int c, const char* s)
611 {
612 (ctxt->methods->DPSwidthshow____)
613 (ctxt, @selector(DPSwidthshow: : : :), x, y, c, s);
614 }
615
616 static inline void
DPSxshow(GSCTXT * ctxt,const char * s,const CGFloat * numarray,int size)617 DPSxshow(GSCTXT *ctxt, const char* s, const CGFloat* numarray, int size)
618 {
619 (ctxt->methods->DPSxshow___)
620 (ctxt, @selector(DPSxshow: : :), s, numarray, size);
621 }
622
623 static inline void
DPSxyshow(GSCTXT * ctxt,const char * s,const CGFloat * numarray,int size)624 DPSxyshow(GSCTXT *ctxt, const char* s, const CGFloat* numarray, int size)
625 {
626 (ctxt->methods->DPSxyshow___)
627 (ctxt, @selector(DPSxyshow: : :), s, numarray, size);
628 }
629
630 static inline void
DPSyshow(GSCTXT * ctxt,const char * s,const CGFloat * numarray,int size)631 DPSyshow(GSCTXT *ctxt, const char* s, const CGFloat* numarray, int size)
632 {
633 (ctxt->methods->DPSyshow___)
634 (ctxt, @selector(DPSyshow: : :), s, numarray, size);
635 }
636
637
638 static inline void
GSSetCharacterSpacing(GSCTXT * ctxt,CGFloat extra)639 GSSetCharacterSpacing(GSCTXT *ctxt, CGFloat extra)
640 {
641 (ctxt->methods->GSSetCharacterSpacing_)
642 (ctxt, @selector(GSSetCharacterSpacing:), extra);
643 }
644
645 static inline void
GSSetFont(GSCTXT * ctxt,NSFont * font)646 GSSetFont(GSCTXT *ctxt, NSFont* font)
647 {
648 (ctxt->methods->GSSetFont_)
649 (ctxt, @selector(GSSetFont:), font);
650 }
651
652 static inline void
GSSetFontSize(GSCTXT * ctxt,CGFloat size)653 GSSetFontSize(GSCTXT *ctxt, CGFloat size)
654 {
655 (ctxt->methods->GSSetFontSize_)
656 (ctxt, @selector(GSSetFontSize:), size);
657 }
658
659 static inline NSAffineTransform *
GSGetTextCTM(GSCTXT * ctxt)660 GSGetTextCTM(GSCTXT *ctxt)
661 {
662 return (ctxt->methods->GSGetTextCTM)
663 (ctxt, @selector(GSGetTextCTM));
664 }
665
666 static inline NSPoint
GSGetTextPosition(GSCTXT * ctxt)667 GSGetTextPosition(GSCTXT *ctxt)
668 {
669 return (ctxt->methods->GSGetTextPosition)
670 (ctxt, @selector(GSGetTextPosition));
671 }
672
673 static inline void
GSSetTextCTM(GSCTXT * ctxt,NSAffineTransform * ctm)674 GSSetTextCTM(GSCTXT *ctxt, NSAffineTransform * ctm)
675 {
676 (ctxt->methods->GSSetTextCTM_)
677 (ctxt, @selector(GSSetTextCTM:), ctm);
678 }
679
680 static inline void
GSSetTextDrawingMode(GSCTXT * ctxt,GSTextDrawingMode mode)681 GSSetTextDrawingMode(GSCTXT *ctxt, GSTextDrawingMode mode)
682 {
683 (ctxt->methods->GSSetTextDrawingMode_)
684 (ctxt, @selector(GSSetTextDrawingMode:), mode);
685 }
686
687 static inline void
GSSetTextPosition(GSCTXT * ctxt,NSPoint loc)688 GSSetTextPosition(GSCTXT *ctxt, NSPoint loc)
689 {
690 (ctxt->methods->GSSetTextPosition_)
691 (ctxt, @selector(GSSetTextPosition:), loc);
692 }
693
694 static inline void
GSShowText(GSCTXT * ctxt,const char * string,size_t length)695 GSShowText(GSCTXT *ctxt, const char * string, size_t length)
696 {
697 (ctxt->methods->GSShowText__)
698 (ctxt, @selector(GSShowText: :), string, length);
699 }
700
701 static inline void
GSShowGlyphs(GSCTXT * ctxt,const NSGlyph * glyphs,size_t length)702 GSShowGlyphs(GSCTXT *ctxt, const NSGlyph * glyphs, size_t length)
703 {
704 (ctxt->methods->GSShowGlyphs__)
705 (ctxt, @selector(GSShowGlyphs: :), glyphs, length);
706 }
707
708 static inline void
GSShowGlyphsWithAdvances(GSCTXT * ctxt,const NSGlyph * glyphs,const NSSize * advances,size_t length)709 GSShowGlyphsWithAdvances(GSCTXT *ctxt, const NSGlyph * glyphs, const NSSize * advances, size_t length)
710 {
711 (ctxt->methods->GSShowGlyphsWithAdvances__)
712 (ctxt, @selector(GSShowGlyphsWithAdvances: :), glyphs, advances, length);
713 }
714
715
716 /* ----------------------------------------------------------------------- */
717 /* Gstate Handling */
718 /* ----------------------------------------------------------------------- */
719 static inline void
DPSgrestore(GSCTXT * ctxt)720 DPSgrestore(GSCTXT *ctxt)
721 {
722 (ctxt->methods->DPSgrestore)
723 (ctxt, @selector(DPSgrestore));
724 }
725
726 static inline void
DPSgsave(GSCTXT * ctxt)727 DPSgsave(GSCTXT *ctxt)
728 {
729 (ctxt->methods->DPSgsave)
730 (ctxt, @selector(DPSgsave));
731 }
732
733 static inline void
DPSinitgraphics(GSCTXT * ctxt)734 DPSinitgraphics(GSCTXT *ctxt)
735 {
736 (ctxt->methods->DPSinitgraphics)
737 (ctxt, @selector(DPSinitgraphics));
738 }
739
740 static inline void
DPSsetgstate(GSCTXT * ctxt,NSInteger gst)741 DPSsetgstate(GSCTXT *ctxt, NSInteger gst)
742 {
743 (ctxt->methods->DPSsetgstate_)
744 (ctxt, @selector(DPSsetgstate:), gst);
745 }
746
747
748 static inline NSInteger
GSDefineGState(GSCTXT * ctxt)749 GSDefineGState(GSCTXT *ctxt)
750 {
751 return (ctxt->methods->GSDefineGState)
752 (ctxt, @selector(GSDefineGState));
753 }
754
755 static inline void
GSUndefineGState(GSCTXT * ctxt,NSInteger gst)756 GSUndefineGState(GSCTXT *ctxt, NSInteger gst)
757 {
758 (ctxt->methods->GSUndefineGState_)
759 (ctxt, @selector(GSUndefineGState:), gst);
760 }
761
762 static inline void
GSReplaceGState(GSCTXT * ctxt,NSInteger gst)763 GSReplaceGState(GSCTXT *ctxt, NSInteger gst)
764 {
765 (ctxt->methods->GSReplaceGState_)
766 (ctxt, @selector(GSReplaceGState:), gst);
767 }
768
769 /* ----------------------------------------------------------------------- */
770 /* Gstate operations */
771 /* ----------------------------------------------------------------------- */
772 static inline void
DPScurrentflat(GSCTXT * ctxt,CGFloat * flatness)773 DPScurrentflat(GSCTXT *ctxt, CGFloat* flatness)
774 {
775 (ctxt->methods->DPScurrentflat_)
776 (ctxt, @selector(DPScurrentflat:), flatness);
777 }
778
779 static inline void
DPScurrentlinecap(GSCTXT * ctxt,int * linecap)780 DPScurrentlinecap(GSCTXT *ctxt, int* linecap)
781 {
782 (ctxt->methods->DPScurrentlinecap_)
783 (ctxt, @selector(DPScurrentlinecap:), linecap);
784 }
785
786 static inline void
DPScurrentlinejoin(GSCTXT * ctxt,int * linejoin)787 DPScurrentlinejoin(GSCTXT *ctxt, int* linejoin)
788 {
789 (ctxt->methods->DPScurrentlinejoin_)
790 (ctxt, @selector(DPScurrentlinejoin:), linejoin);
791 }
792
793 static inline void
DPScurrentlinewidth(GSCTXT * ctxt,CGFloat * width)794 DPScurrentlinewidth(GSCTXT *ctxt, CGFloat* width)
795 {
796 (ctxt->methods->DPScurrentlinewidth_)
797 (ctxt, @selector(DPScurrentlinewidth:), width);
798 }
799
800 static inline void
DPScurrentmiterlimit(GSCTXT * ctxt,CGFloat * limit)801 DPScurrentmiterlimit(GSCTXT *ctxt, CGFloat* limit)
802 {
803 (ctxt->methods->DPScurrentmiterlimit_)
804 (ctxt, @selector(DPScurrentmiterlimit:), limit);
805 }
806
807 static inline void
DPScurrentpoint(GSCTXT * ctxt,CGFloat * x,CGFloat * y)808 DPScurrentpoint(GSCTXT *ctxt, CGFloat* x, CGFloat* y)
809 {
810 (ctxt->methods->DPScurrentpoint__)
811 (ctxt, @selector(DPScurrentpoint: :), x, y);
812 }
813
814 static inline void
DPScurrentstrokeadjust(GSCTXT * ctxt,int * b)815 DPScurrentstrokeadjust(GSCTXT *ctxt, int* b)
816 {
817 (ctxt->methods->DPScurrentstrokeadjust_)
818 (ctxt, @selector(DPScurrentstrokeadjust:), b);
819 }
820
821 static inline void
DPSsetdash(GSCTXT * ctxt,const CGFloat * pat,NSInteger size,CGFloat offset)822 DPSsetdash(GSCTXT *ctxt, const CGFloat* pat, NSInteger size, CGFloat offset)
823 {
824 (ctxt->methods->DPSsetdash___)
825 (ctxt, @selector(DPSsetdash: : :), pat, size, offset);
826 }
827
828 static inline void
DPSsetflat(GSCTXT * ctxt,CGFloat flatness)829 DPSsetflat(GSCTXT *ctxt, CGFloat flatness)
830 {
831 (ctxt->methods->DPSsetflat_)
832 (ctxt, @selector(DPSsetflat:), flatness);
833 }
834
835 static inline void
DPSsethalftonephase(GSCTXT * ctxt,CGFloat x,CGFloat y)836 DPSsethalftonephase(GSCTXT *ctxt, CGFloat x, CGFloat y)
837 {
838 (ctxt->methods->DPSsethalftonephase__)
839 (ctxt, @selector(DPSsethalftonephase: :), x, y);
840 }
841
842 static inline void
DPSsetlinecap(GSCTXT * ctxt,int linecap)843 DPSsetlinecap(GSCTXT *ctxt, int linecap)
844 {
845 (ctxt->methods->DPSsetlinecap_)
846 (ctxt, @selector(DPSsetlinecap:), linecap);
847 }
848
849 static inline void
DPSsetlinejoin(GSCTXT * ctxt,int linejoin)850 DPSsetlinejoin(GSCTXT *ctxt, int linejoin)
851 {
852 (ctxt->methods->DPSsetlinejoin_)
853 (ctxt, @selector(DPSsetlinejoin:), linejoin);
854 }
855
856 static inline void
DPSsetlinewidth(GSCTXT * ctxt,CGFloat width)857 DPSsetlinewidth(GSCTXT *ctxt, CGFloat width)
858 {
859 (ctxt->methods->DPSsetlinewidth_)
860 (ctxt, @selector(DPSsetlinewidth:), width);
861 }
862
863 static inline void
DPSsetmiterlimit(GSCTXT * ctxt,CGFloat limit)864 DPSsetmiterlimit(GSCTXT *ctxt, CGFloat limit)
865 {
866 (ctxt->methods->DPSsetmiterlimit_)
867 (ctxt, @selector(DPSsetmiterlimit:), limit);
868 }
869
870 static inline void
DPSsetstrokeadjust(GSCTXT * ctxt,int b)871 DPSsetstrokeadjust(GSCTXT *ctxt, int b)
872 {
873 (ctxt->methods->DPSsetstrokeadjust_)
874 (ctxt, @selector(DPSsetstrokeadjust:), b);
875 }
876
877
878 /* ----------------------------------------------------------------------- */
879 /* Matrix operations */
880 /* ----------------------------------------------------------------------- */
881 static inline void
DPSconcat(GSCTXT * ctxt,const CGFloat * m)882 DPSconcat(GSCTXT *ctxt, const CGFloat* m)
883 {
884 (ctxt->methods->DPSconcat_)
885 (ctxt, @selector(DPSconcat:), m);
886 }
887
888 static inline void
DPSinitmatrix(GSCTXT * ctxt)889 DPSinitmatrix(GSCTXT *ctxt)
890 {
891 (ctxt->methods->DPSinitmatrix)
892 (ctxt, @selector(DPSinitmatrix));
893 }
894
895 static inline void
DPSrotate(GSCTXT * ctxt,CGFloat angle)896 DPSrotate(GSCTXT *ctxt, CGFloat angle)
897 {
898 (ctxt->methods->DPSrotate_)
899 (ctxt, @selector(DPSrotate:), angle);
900 }
901
902 static inline void
DPSscale(GSCTXT * ctxt,CGFloat x,CGFloat y)903 DPSscale(GSCTXT *ctxt, CGFloat x, CGFloat y)
904 {
905 (ctxt->methods->DPSscale__)
906 (ctxt, @selector(DPSscale: :), x, y);
907 }
908
909 static inline void
DPStranslate(GSCTXT * ctxt,CGFloat x,CGFloat y)910 DPStranslate(GSCTXT *ctxt, CGFloat x, CGFloat y)
911 {
912 (ctxt->methods->DPStranslate__)
913 (ctxt, @selector(DPStranslate: :), x, y);
914 }
915
916
917 static inline NSAffineTransform *
GSCurrentCTM(GSCTXT * ctxt)918 GSCurrentCTM(GSCTXT *ctxt)
919 {
920 return (ctxt->methods->GSCurrentCTM)
921 (ctxt, @selector(GSCurrentCTM));
922 }
923
924 static inline void
GSSetCTM(GSCTXT * ctxt,NSAffineTransform * ctm)925 GSSetCTM(GSCTXT *ctxt, NSAffineTransform * ctm)
926 {
927 (ctxt->methods->GSSetCTM_)
928 (ctxt, @selector(GSSetCTM:), ctm);
929 }
930
931 static inline void
GSConcatCTM(GSCTXT * ctxt,NSAffineTransform * ctm)932 GSConcatCTM(GSCTXT *ctxt, NSAffineTransform * ctm)
933 {
934 (ctxt->methods->GSConcatCTM_)
935 (ctxt, @selector(GSConcatCTM:), ctm);
936 }
937
938
939 /* ----------------------------------------------------------------------- */
940 /* Paint operations */
941 /* ----------------------------------------------------------------------- */
942 static inline void
DPSarc(GSCTXT * ctxt,CGFloat x,CGFloat y,CGFloat r,CGFloat angle1,CGFloat angle2)943 DPSarc(GSCTXT *ctxt, CGFloat x, CGFloat y, CGFloat r, CGFloat angle1, CGFloat angle2)
944 {
945 (ctxt->methods->DPSarc_____)
946 (ctxt, @selector(DPSarc: : : : :), x, y, r, angle1, angle2);
947 }
948
949 static inline void
DPSarcn(GSCTXT * ctxt,CGFloat x,CGFloat y,CGFloat r,CGFloat angle1,CGFloat angle2)950 DPSarcn(GSCTXT *ctxt, CGFloat x, CGFloat y, CGFloat r, CGFloat angle1, CGFloat angle2)
951 {
952 (ctxt->methods->DPSarcn_____)
953 (ctxt, @selector(DPSarcn: : : : :), x, y, r, angle1, angle2);
954 }
955
956 static inline void
DPSarct(GSCTXT * ctxt,CGFloat x1,CGFloat y1,CGFloat x2,CGFloat y2,CGFloat r)957 DPSarct(GSCTXT *ctxt, CGFloat x1, CGFloat y1, CGFloat x2, CGFloat y2, CGFloat r)
958 {
959 (ctxt->methods->DPSarct_____)
960 (ctxt, @selector(DPSarct: : : : :), x1, y1, x2, y2, r);
961 }
962
963 static inline void
DPSclip(GSCTXT * ctxt)964 DPSclip(GSCTXT *ctxt)
965 {
966 (ctxt->methods->DPSclip)
967 (ctxt, @selector(DPSclip));
968 }
969
970 static inline void
DPSclosepath(GSCTXT * ctxt)971 DPSclosepath(GSCTXT *ctxt)
972 {
973 (ctxt->methods->DPSclosepath)
974 (ctxt, @selector(DPSclosepath));
975 }
976
977 static inline void
DPScurveto(GSCTXT * ctxt,CGFloat x1,CGFloat y1,CGFloat x2,CGFloat y2,CGFloat x3,CGFloat y3)978 DPScurveto(GSCTXT *ctxt, CGFloat x1, CGFloat y1, CGFloat x2, CGFloat y2, CGFloat x3, CGFloat y3)
979 {
980 (ctxt->methods->DPScurveto______)
981 (ctxt, @selector(DPScurveto: : : : : :), x1, y1, x2, y2, x3, y3);
982 }
983
984 static inline void
DPSeoclip(GSCTXT * ctxt)985 DPSeoclip(GSCTXT *ctxt)
986 {
987 (ctxt->methods->DPSeoclip)
988 (ctxt, @selector(DPSeoclip));
989 }
990
991 static inline void
DPSeofill(GSCTXT * ctxt)992 DPSeofill(GSCTXT *ctxt)
993 {
994 (ctxt->methods->DPSeofill)
995 (ctxt, @selector(DPSeofill));
996 }
997
998 static inline void
DPSfill(GSCTXT * ctxt)999 DPSfill(GSCTXT *ctxt)
1000 {
1001 (ctxt->methods->DPSfill)
1002 (ctxt, @selector(DPSfill));
1003 }
1004
1005 static inline void
DPSflattenpath(GSCTXT * ctxt)1006 DPSflattenpath(GSCTXT *ctxt)
1007 {
1008 (ctxt->methods->DPSflattenpath)
1009 (ctxt, @selector(DPSflattenpath));
1010 }
1011
1012 static inline void
DPSinitclip(GSCTXT * ctxt)1013 DPSinitclip(GSCTXT *ctxt)
1014 {
1015 (ctxt->methods->DPSinitclip)
1016 (ctxt, @selector(DPSinitclip));
1017 }
1018
1019 static inline void
DPSlineto(GSCTXT * ctxt,CGFloat x,CGFloat y)1020 DPSlineto(GSCTXT *ctxt, CGFloat x, CGFloat y)
1021 {
1022 (ctxt->methods->DPSlineto__)
1023 (ctxt, @selector(DPSlineto: :), x, y);
1024 }
1025
1026 static inline void
DPSmoveto(GSCTXT * ctxt,CGFloat x,CGFloat y)1027 DPSmoveto(GSCTXT *ctxt, CGFloat x, CGFloat y)
1028 {
1029 (ctxt->methods->DPSmoveto__)
1030 (ctxt, @selector(DPSmoveto: :), x, y);
1031 }
1032
1033 static inline void
DPSnewpath(GSCTXT * ctxt)1034 DPSnewpath(GSCTXT *ctxt)
1035 {
1036 (ctxt->methods->DPSnewpath)
1037 (ctxt, @selector(DPSnewpath));
1038 }
1039
1040 static inline void
DPSpathbbox(GSCTXT * ctxt,CGFloat * llx,CGFloat * lly,CGFloat * urx,CGFloat * ury)1041 DPSpathbbox(GSCTXT *ctxt, CGFloat* llx, CGFloat* lly, CGFloat* urx, CGFloat* ury)
1042 {
1043 (ctxt->methods->DPSpathbbox____)
1044 (ctxt, @selector(DPSpathbbox: : : :), llx, lly, urx, ury);
1045 }
1046
1047 static inline void
DPSrcurveto(GSCTXT * ctxt,CGFloat x1,CGFloat y1,CGFloat x2,CGFloat y2,CGFloat x3,CGFloat y3)1048 DPSrcurveto(GSCTXT *ctxt, CGFloat x1, CGFloat y1, CGFloat x2, CGFloat y2, CGFloat x3, CGFloat y3)
1049 {
1050 (ctxt->methods->DPSrcurveto______)
1051 (ctxt, @selector(DPSrcurveto: : : : : :), x1, y1, x2, y2, x3, y3);
1052 }
1053
1054 static inline void
DPSrectclip(GSCTXT * ctxt,CGFloat x,CGFloat y,CGFloat w,CGFloat h)1055 DPSrectclip(GSCTXT *ctxt, CGFloat x, CGFloat y, CGFloat w, CGFloat h)
1056 {
1057 (ctxt->methods->DPSrectclip____)
1058 (ctxt, @selector(DPSrectclip: : : :), x, y, w, h);
1059 }
1060
1061 static inline void
DPSrectfill(GSCTXT * ctxt,CGFloat x,CGFloat y,CGFloat w,CGFloat h)1062 DPSrectfill(GSCTXT *ctxt, CGFloat x, CGFloat y, CGFloat w, CGFloat h)
1063 {
1064 (ctxt->methods->DPSrectfill____)
1065 (ctxt, @selector(DPSrectfill: : : :), x, y, w, h);
1066 }
1067
1068 static inline void
DPSrectstroke(GSCTXT * ctxt,CGFloat x,CGFloat y,CGFloat w,CGFloat h)1069 DPSrectstroke(GSCTXT *ctxt, CGFloat x, CGFloat y, CGFloat w, CGFloat h)
1070 {
1071 (ctxt->methods->DPSrectstroke____)
1072 (ctxt, @selector(DPSrectstroke: : : :), x, y, w, h);
1073 }
1074
1075 static inline void
DPSreversepath(GSCTXT * ctxt)1076 DPSreversepath(GSCTXT *ctxt)
1077 {
1078 (ctxt->methods->DPSreversepath)
1079 (ctxt, @selector(DPSreversepath));
1080 }
1081
1082 static inline void
DPSrlineto(GSCTXT * ctxt,CGFloat x,CGFloat y)1083 DPSrlineto(GSCTXT *ctxt, CGFloat x, CGFloat y)
1084 {
1085 (ctxt->methods->DPSrlineto__)
1086 (ctxt, @selector(DPSrlineto: :), x, y);
1087 }
1088
1089 static inline void
DPSrmoveto(GSCTXT * ctxt,CGFloat x,CGFloat y)1090 DPSrmoveto(GSCTXT *ctxt, CGFloat x, CGFloat y)
1091 {
1092 (ctxt->methods->DPSrmoveto__)
1093 (ctxt, @selector(DPSrmoveto: :), x, y);
1094 }
1095
1096 static inline void
DPSstroke(GSCTXT * ctxt)1097 DPSstroke(GSCTXT *ctxt)
1098 {
1099 (ctxt->methods->DPSstroke)
1100 (ctxt, @selector(DPSstroke));
1101 }
1102
1103 static inline void
DPSshfill(GSCTXT * ctxt,NSDictionary * shaderDictionary)1104 DPSshfill(GSCTXT *ctxt, NSDictionary *shaderDictionary)
1105 {
1106 (ctxt->methods->DPSshfill)
1107 (ctxt, @selector(DPSshfill:), shaderDictionary);
1108 }
1109
1110
1111 static inline void
GSSendBezierPath(GSCTXT * ctxt,NSBezierPath * path)1112 GSSendBezierPath(GSCTXT *ctxt, NSBezierPath * path)
1113 {
1114 (ctxt->methods->GSSendBezierPath_)
1115 (ctxt, @selector(GSSendBezierPath:), path);
1116 }
1117
1118 static inline void
GSRectClipList(GSCTXT * ctxt,const NSRect * rects,int count)1119 GSRectClipList(GSCTXT *ctxt, const NSRect * rects, int count)
1120 {
1121 (ctxt->methods->GSRectClipList__)
1122 (ctxt, @selector(GSRectClipList: :), rects, count);
1123 }
1124
1125 static inline void
GSRectFillList(GSCTXT * ctxt,const NSRect * rects,int count)1126 GSRectFillList(GSCTXT *ctxt, const NSRect * rects, int count)
1127 {
1128 (ctxt->methods->GSRectFillList__)
1129 (ctxt, @selector(GSRectFillList: :), rects, count);
1130 }
1131
1132
1133 /* ----------------------------------------------------------------------- */
1134 /* Window system ops */
1135 /* ----------------------------------------------------------------------- */
1136 static inline void
GSCurrentDevice(GSCTXT * ctxt,void ** device,int * x,int * y)1137 GSCurrentDevice(GSCTXT *ctxt, void** device, int* x, int* y)
1138 {
1139 (ctxt->methods->GSCurrentDevice___)
1140 (ctxt, @selector(GSCurrentDevice: : :), device, x, y);
1141 }
1142
1143 static inline void
DPScurrentoffset(GSCTXT * ctxt,int * x,int * y)1144 DPScurrentoffset(GSCTXT *ctxt, int* x, int* y)
1145 {
1146 (ctxt->methods->DPScurrentoffset__)
1147 (ctxt, @selector(DPScurrentoffset: :), x, y);
1148 }
1149
1150 static inline void
GSSetDevice(GSCTXT * ctxt,void * device,int x,int y)1151 GSSetDevice(GSCTXT *ctxt, void* device, int x, int y)
1152 {
1153 (ctxt->methods->GSSetDevice___)
1154 (ctxt, @selector(GSSetDevice: : :), device, x, y);
1155 }
1156
1157 static inline void
DPSsetoffset(GSCTXT * ctxt,short int x,short int y)1158 DPSsetoffset(GSCTXT *ctxt, short int x, short int y)
1159 {
1160 (ctxt->methods->DPSsetoffset__)
1161 (ctxt, @selector(DPSsetoffset: :), x, y);
1162 }
1163
1164
1165 /*-------------------------------------------------------------------------*/
1166 /* Graphics Extensions Ops */
1167 /*-------------------------------------------------------------------------*/
1168 static inline void
DPScomposite(GSCTXT * ctxt,CGFloat x,CGFloat y,CGFloat w,CGFloat h,NSInteger gstateNum,CGFloat dx,CGFloat dy,NSCompositingOperation op)1169 DPScomposite(GSCTXT *ctxt, CGFloat x, CGFloat y, CGFloat w, CGFloat h,
1170 NSInteger gstateNum, CGFloat dx, CGFloat dy, NSCompositingOperation op)
1171 {
1172 (ctxt->methods->DPScomposite________)
1173 (ctxt, @selector(DPScomposite: : : : : : : :), x, y, w, h, gstateNum, dx, dy, op);
1174 }
1175
1176 static inline void
DPScompositerect(GSCTXT * ctxt,CGFloat x,CGFloat y,CGFloat w,CGFloat h,NSCompositingOperation op)1177 DPScompositerect(GSCTXT *ctxt, CGFloat x, CGFloat y, CGFloat w, CGFloat h, NSCompositingOperation op)
1178 {
1179 (ctxt->methods->DPScompositerect_____)
1180 (ctxt, @selector(DPScompositerect: : : : :), x, y, w, h, op);
1181 }
1182
1183 static inline void
DPSdissolve(GSCTXT * ctxt,CGFloat x,CGFloat y,CGFloat w,CGFloat h,NSInteger gstateNum,CGFloat dx,CGFloat dy,CGFloat delta)1184 DPSdissolve(GSCTXT *ctxt, CGFloat x, CGFloat y, CGFloat w, CGFloat h, NSInteger gstateNum, CGFloat dx, CGFloat dy, CGFloat delta)
1185 {
1186 (ctxt->methods->DPSdissolve________)
1187 (ctxt, @selector(DPSdissolve: : : : : : : :), x, y, w, h, gstateNum, dx, dy, delta);
1188 }
1189
1190
1191 static inline void
GSDrawImage(GSCTXT * ctxt,NSRect rect,void * imageref)1192 GSDrawImage(GSCTXT *ctxt, NSRect rect, void * imageref)
1193 {
1194 (ctxt->methods->GSDrawImage__)
1195 (ctxt, @selector(GSDrawImage: :), rect, imageref);
1196 }
1197
1198
1199 /* ----------------------------------------------------------------------- */
1200 /* Postscript Client functions */
1201 /* ----------------------------------------------------------------------- */
1202 static void
DPSPrintf(GSCTXT * ctxt,const char * fmt,...)1203 DPSPrintf(GSCTXT *ctxt, const char * fmt, ...)
1204 {
1205 va_list ap;
1206
1207 va_start(ap, fmt);
1208 if (fmt != NULL)
1209 (ctxt->methods->DPSPrintf__)
1210 (ctxt, @selector(DPSPrintf: :), fmt, ap);
1211 va_end(ap);
1212 }
1213
1214 static inline void
DPSWriteData(GSCTXT * ctxt,const char * buf,unsigned int count)1215 DPSWriteData(GSCTXT *ctxt, const char * buf, unsigned int count)
1216 {
1217 (ctxt->methods->DPSWriteData__)
1218 (ctxt, @selector(DPSWriteData: :), buf, count);
1219 }
1220
1221 #endif
1222