1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
|
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
<!ENTITY version SYSTEM "version.xml">
]>
<refentry id="cairo-Regions">
<refmeta>
<refentrytitle role="top_of_page" id="cairo-Regions.top_of_page">Regions</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>CAIRO Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>Regions</refname>
<refpurpose>Representing a pixel-aligned area</refpurpose>
</refnamediv>
<refsect1 id="cairo-Regions.functions" role="functions_proto">
<title role="functions_proto.title">Functions</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="functions_return" colwidth="150px"/>
<colspec colname="functions_name"/>
<tbody>
<row><entry role="function_type"><link linkend="cairo-region-t"><returnvalue>cairo_region_t</returnvalue></link> *
</entry><entry role="function_name"><link linkend="cairo-region-create">cairo_region_create</link> <phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="cairo-region-t"><returnvalue>cairo_region_t</returnvalue></link> *
</entry><entry role="function_name"><link linkend="cairo-region-create-rectangle">cairo_region_create_rectangle</link> <phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="cairo-region-t"><returnvalue>cairo_region_t</returnvalue></link> *
</entry><entry role="function_name"><link linkend="cairo-region-create-rectangles">cairo_region_create_rectangles</link> <phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="cairo-region-t"><returnvalue>cairo_region_t</returnvalue></link> *
</entry><entry role="function_name"><link linkend="cairo-region-copy">cairo_region_copy</link> <phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="cairo-region-t"><returnvalue>cairo_region_t</returnvalue></link> *
</entry><entry role="function_name"><link linkend="cairo-region-reference">cairo_region_reference</link> <phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="cairo-region-destroy">cairo_region_destroy</link> <phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="cairo-status-t"><returnvalue>cairo_status_t</returnvalue></link>
</entry><entry role="function_name"><link linkend="cairo-region-status">cairo_region_status</link> <phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="cairo-region-get-extents">cairo_region_get_extents</link> <phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="int"><returnvalue>int</returnvalue></link>
</entry><entry role="function_name"><link linkend="cairo-region-num-rectangles">cairo_region_num_rectangles</link> <phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="cairo-region-get-rectangle">cairo_region_get_rectangle</link> <phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="cairo-bool-t"><returnvalue>cairo_bool_t</returnvalue></link>
</entry><entry role="function_name"><link linkend="cairo-region-is-empty">cairo_region_is_empty</link> <phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="cairo-bool-t"><returnvalue>cairo_bool_t</returnvalue></link>
</entry><entry role="function_name"><link linkend="cairo-region-contains-point">cairo_region_contains_point</link> <phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="cairo-region-overlap-t"><returnvalue>cairo_region_overlap_t</returnvalue></link>
</entry><entry role="function_name"><link linkend="cairo-region-contains-rectangle">cairo_region_contains_rectangle</link> <phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="cairo-bool-t"><returnvalue>cairo_bool_t</returnvalue></link>
</entry><entry role="function_name"><link linkend="cairo-region-equal">cairo_region_equal</link> <phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="cairo-region-translate">cairo_region_translate</link> <phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="cairo-status-t"><returnvalue>cairo_status_t</returnvalue></link>
</entry><entry role="function_name"><link linkend="cairo-region-intersect">cairo_region_intersect</link> <phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="cairo-status-t"><returnvalue>cairo_status_t</returnvalue></link>
</entry><entry role="function_name"><link linkend="cairo-region-intersect-rectangle">cairo_region_intersect_rectangle</link> <phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="cairo-status-t"><returnvalue>cairo_status_t</returnvalue></link>
</entry><entry role="function_name"><link linkend="cairo-region-subtract">cairo_region_subtract</link> <phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="cairo-status-t"><returnvalue>cairo_status_t</returnvalue></link>
</entry><entry role="function_name"><link linkend="cairo-region-subtract-rectangle">cairo_region_subtract_rectangle</link> <phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="cairo-status-t"><returnvalue>cairo_status_t</returnvalue></link>
</entry><entry role="function_name"><link linkend="cairo-region-union">cairo_region_union</link> <phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="cairo-status-t"><returnvalue>cairo_status_t</returnvalue></link>
</entry><entry role="function_name"><link linkend="cairo-region-union-rectangle">cairo_region_union_rectangle</link> <phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="cairo-status-t"><returnvalue>cairo_status_t</returnvalue></link>
</entry><entry role="function_name"><link linkend="cairo-region-xor">cairo_region_xor</link> <phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="cairo-status-t"><returnvalue>cairo_status_t</returnvalue></link>
</entry><entry role="function_name"><link linkend="cairo-region-xor-rectangle">cairo_region_xor_rectangle</link> <phrase role="c_punctuation">()</phrase></entry></row>
</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="cairo-Regions.other" role="other_proto">
<title role="other_proto.title">Types and Values</title>
<informaltable role="enum_members_table" pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="name" colwidth="150px"/>
<colspec colname="description"/>
<tbody>
<row><entry role="typedef_keyword">typedef</entry><entry role="function_name"><link linkend="cairo-region-t">cairo_region_t</link></entry></row>
<row><entry role="datatype_keyword">enum</entry><entry role="function_name"><link linkend="cairo-region-overlap-t">cairo_region_overlap_t</link></entry></row>
</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="cairo-Regions.description" role="desc">
<title role="desc.title">Description</title>
<para>Regions are a simple graphical data type representing an area of
integer-aligned rectangles. They are often used on raster surfaces
to track areas of interest, such as change or clip areas.</para>
</refsect1>
<refsect1 id="cairo-Regions.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="cairo-region-create" role="function" condition="since:1.10">
<title>cairo_region_create ()</title>
<indexterm zone="cairo-region-create" role="1.10"><primary sortas="region_create">cairo_region_create</primary></indexterm>
<programlisting language="C"><link linkend="cairo-region-t"><returnvalue>cairo_region_t</returnvalue></link> *
cairo_region_create (<parameter><type>void</type></parameter>);</programlisting>
<para>Allocates a new empty region object.</para>
<refsect3 id="cairo-region-create.returns" role="returns">
<title>Returns</title>
<para> A newly allocated <link linkend="cairo-region-t"><type>cairo_region_t</type></link>. Free with
<link linkend="cairo-region-destroy"><function>cairo_region_destroy()</function></link>. This function always returns a
valid pointer; if memory cannot be allocated, then a special
error object is returned where all operations on the object do nothing.
You can check for this with <link linkend="cairo-region-status"><function>cairo_region_status()</function></link>.</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.10">1.10</link></para></refsect2>
<refsect2 id="cairo-region-create-rectangle" role="function" condition="since:1.10">
<title>cairo_region_create_rectangle ()</title>
<indexterm zone="cairo-region-create-rectangle" role="1.10"><primary sortas="region_create_rectangle">cairo_region_create_rectangle</primary></indexterm>
<programlisting language="C"><link linkend="cairo-region-t"><returnvalue>cairo_region_t</returnvalue></link> *
cairo_region_create_rectangle (<parameter>const <link linkend="cairo-rectangle-int-t"><type>cairo_rectangle_int_t</type></link> *rectangle</parameter>);</programlisting>
<para>Allocates a new region object containing <parameter>rectangle</parameter>
.</para>
<refsect3 id="cairo-region-create-rectangle.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>rectangle</para></entry>
<entry role="parameter_description"><para>a <link linkend="cairo-rectangle-int-t"><type>cairo_rectangle_int_t</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="cairo-region-create-rectangle.returns" role="returns">
<title>Returns</title>
<para> A newly allocated <link linkend="cairo-region-t"><type>cairo_region_t</type></link>. Free with
<link linkend="cairo-region-destroy"><function>cairo_region_destroy()</function></link>. This function always returns a
valid pointer; if memory cannot be allocated, then a special
error object is returned where all operations on the object do nothing.
You can check for this with <link linkend="cairo-region-status"><function>cairo_region_status()</function></link>.</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.10">1.10</link></para></refsect2>
<refsect2 id="cairo-region-create-rectangles" role="function" condition="since:1.10">
<title>cairo_region_create_rectangles ()</title>
<indexterm zone="cairo-region-create-rectangles" role="1.10"><primary sortas="region_create_rectangles">cairo_region_create_rectangles</primary></indexterm>
<programlisting language="C"><link linkend="cairo-region-t"><returnvalue>cairo_region_t</returnvalue></link> *
cairo_region_create_rectangles (<parameter>const <link linkend="cairo-rectangle-int-t"><type>cairo_rectangle_int_t</type></link> *rects</parameter>,
<parameter><link linkend="int"><type>int</type></link> count</parameter>);</programlisting>
<para>Allocates a new region object containing the union of all given <parameter>rects</parameter>
.</para>
<refsect3 id="cairo-region-create-rectangles.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>rects</para></entry>
<entry role="parameter_description"><para>an array of <parameter>count</parameter>
rectangles</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>count</para></entry>
<entry role="parameter_description"><para>number of rectangles</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="cairo-region-create-rectangles.returns" role="returns">
<title>Returns</title>
<para> A newly allocated <link linkend="cairo-region-t"><type>cairo_region_t</type></link>. Free with
<link linkend="cairo-region-destroy"><function>cairo_region_destroy()</function></link>. This function always returns a
valid pointer; if memory cannot be allocated, then a special
error object is returned where all operations on the object do nothing.
You can check for this with <link linkend="cairo-region-status"><function>cairo_region_status()</function></link>.</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.10">1.10</link></para></refsect2>
<refsect2 id="cairo-region-copy" role="function" condition="since:1.10">
<title>cairo_region_copy ()</title>
<indexterm zone="cairo-region-copy" role="1.10"><primary sortas="region_copy">cairo_region_copy</primary></indexterm>
<programlisting language="C"><link linkend="cairo-region-t"><returnvalue>cairo_region_t</returnvalue></link> *
cairo_region_copy (<parameter>const <link linkend="cairo-region-t"><type>cairo_region_t</type></link> *original</parameter>);</programlisting>
<para>Allocates a new region object copying the area from <parameter>original</parameter>
.</para>
<refsect3 id="cairo-region-copy.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>original</para></entry>
<entry role="parameter_description"><para>a <link linkend="cairo-region-t"><type>cairo_region_t</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="cairo-region-copy.returns" role="returns">
<title>Returns</title>
<para> A newly allocated <link linkend="cairo-region-t"><type>cairo_region_t</type></link>. Free with
<link linkend="cairo-region-destroy"><function>cairo_region_destroy()</function></link>. This function always returns a
valid pointer; if memory cannot be allocated, then a special
error object is returned where all operations on the object do nothing.
You can check for this with <link linkend="cairo-region-status"><function>cairo_region_status()</function></link>.</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.10">1.10</link></para></refsect2>
<refsect2 id="cairo-region-reference" role="function" condition="since:1.10">
<title>cairo_region_reference ()</title>
<indexterm zone="cairo-region-reference" role="1.10"><primary sortas="region_reference">cairo_region_reference</primary></indexterm>
<programlisting language="C"><link linkend="cairo-region-t"><returnvalue>cairo_region_t</returnvalue></link> *
cairo_region_reference (<parameter><link linkend="cairo-region-t"><type>cairo_region_t</type></link> *region</parameter>);</programlisting>
<para>Increases the reference count on <parameter>region</parameter>
by one. This prevents
<parameter>region</parameter>
from being destroyed until a matching call to
<link linkend="cairo-region-destroy"><function>cairo_region_destroy()</function></link> is made.</para>
<refsect3 id="cairo-region-reference.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>region</para></entry>
<entry role="parameter_description"><para>a <link linkend="cairo-region-t"><type>cairo_region_t</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="cairo-region-reference.returns" role="returns">
<title>Returns</title>
<para> the referenced <link linkend="cairo-region-t"><type>cairo_region_t</type></link>.</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.10">1.10</link></para></refsect2>
<refsect2 id="cairo-region-destroy" role="function" condition="since:1.10">
<title>cairo_region_destroy ()</title>
<indexterm zone="cairo-region-destroy" role="1.10"><primary sortas="region_destroy">cairo_region_destroy</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
cairo_region_destroy (<parameter><link linkend="cairo-region-t"><type>cairo_region_t</type></link> *region</parameter>);</programlisting>
<para>Destroys a <link linkend="cairo-region-t"><type>cairo_region_t</type></link> object created with
<link linkend="cairo-region-create"><function>cairo_region_create()</function></link>, <link linkend="cairo-region-copy"><function>cairo_region_copy()</function></link>, or
or <link linkend="cairo-region-create-rectangle"><function>cairo_region_create_rectangle()</function></link>.</para>
<refsect3 id="cairo-region-destroy.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>region</para></entry>
<entry role="parameter_description"><para>a <link linkend="cairo-region-t"><type>cairo_region_t</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para role="since">Since: <link linkend="api-index-1.10">1.10</link></para></refsect2>
<refsect2 id="cairo-region-status" role="function" condition="since:1.10">
<title>cairo_region_status ()</title>
<indexterm zone="cairo-region-status" role="1.10"><primary sortas="region_status">cairo_region_status</primary></indexterm>
<programlisting language="C"><link linkend="cairo-status-t"><returnvalue>cairo_status_t</returnvalue></link>
cairo_region_status (<parameter>const <link linkend="cairo-region-t"><type>cairo_region_t</type></link> *region</parameter>);</programlisting>
<para>Checks whether an error has previous occurred for this
region object.</para>
<refsect3 id="cairo-region-status.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>region</para></entry>
<entry role="parameter_description"><para>a <link linkend="cairo-region-t"><type>cairo_region_t</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="cairo-region-status.returns" role="returns">
<title>Returns</title>
<para> <link linkend="CAIRO-STATUS-SUCCESS:CAPS"><literal>CAIRO_STATUS_SUCCESS</literal></link> or <link linkend="CAIRO-STATUS-NO-MEMORY:CAPS"><literal>CAIRO_STATUS_NO_MEMORY</literal></link></para>
</refsect3><para role="since">Since: <link linkend="api-index-1.10">1.10</link></para></refsect2>
<refsect2 id="cairo-region-get-extents" role="function" condition="since:1.10">
<title>cairo_region_get_extents ()</title>
<indexterm zone="cairo-region-get-extents" role="1.10"><primary sortas="region_get_extents">cairo_region_get_extents</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
cairo_region_get_extents (<parameter>const <link linkend="cairo-region-t"><type>cairo_region_t</type></link> *region</parameter>,
<parameter><link linkend="cairo-rectangle-int-t"><type>cairo_rectangle_int_t</type></link> *extents</parameter>);</programlisting>
<para>Gets the bounding rectangle of <parameter>region</parameter>
as a <link linkend="cairo-rectangle-int-t"><type>cairo_rectangle_int_t</type></link></para>
<refsect3 id="cairo-region-get-extents.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>region</para></entry>
<entry role="parameter_description"><para>a <link linkend="cairo-region-t"><type>cairo_region_t</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>extents</para></entry>
<entry role="parameter_description"><para>rectangle into which to store the extents</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para role="since">Since: <link linkend="api-index-1.10">1.10</link></para></refsect2>
<refsect2 id="cairo-region-num-rectangles" role="function" condition="since:1.10">
<title>cairo_region_num_rectangles ()</title>
<indexterm zone="cairo-region-num-rectangles" role="1.10"><primary sortas="region_num_rectangles">cairo_region_num_rectangles</primary></indexterm>
<programlisting language="C"><link linkend="int"><returnvalue>int</returnvalue></link>
cairo_region_num_rectangles (<parameter>const <link linkend="cairo-region-t"><type>cairo_region_t</type></link> *region</parameter>);</programlisting>
<para>Returns the number of rectangles contained in <parameter>region</parameter>
.</para>
<refsect3 id="cairo-region-num-rectangles.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>region</para></entry>
<entry role="parameter_description"><para>a <link linkend="cairo-region-t"><type>cairo_region_t</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="cairo-region-num-rectangles.returns" role="returns">
<title>Returns</title>
<para> The number of rectangles contained in <parameter>region</parameter>
.</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.10">1.10</link></para></refsect2>
<refsect2 id="cairo-region-get-rectangle" role="function" condition="since:1.10">
<title>cairo_region_get_rectangle ()</title>
<indexterm zone="cairo-region-get-rectangle" role="1.10"><primary sortas="region_get_rectangle">cairo_region_get_rectangle</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
cairo_region_get_rectangle (<parameter>const <link linkend="cairo-region-t"><type>cairo_region_t</type></link> *region</parameter>,
<parameter><link linkend="int"><type>int</type></link> nth</parameter>,
<parameter><link linkend="cairo-rectangle-int-t"><type>cairo_rectangle_int_t</type></link> *rectangle</parameter>);</programlisting>
<para>Stores the <parameter>nth</parameter>
rectangle from the region in <parameter>rectangle</parameter>
.</para>
<refsect3 id="cairo-region-get-rectangle.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>region</para></entry>
<entry role="parameter_description"><para>a <link linkend="cairo-region-t"><type>cairo_region_t</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>nth</para></entry>
<entry role="parameter_description"><para>a number indicating which rectangle should be returned</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>rectangle</para></entry>
<entry role="parameter_description"><para>return location for a <link linkend="cairo-rectangle-int-t"><type>cairo_rectangle_int_t</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para role="since">Since: <link linkend="api-index-1.10">1.10</link></para></refsect2>
<refsect2 id="cairo-region-is-empty" role="function" condition="since:1.10">
<title>cairo_region_is_empty ()</title>
<indexterm zone="cairo-region-is-empty" role="1.10"><primary sortas="region_is_empty">cairo_region_is_empty</primary></indexterm>
<programlisting language="C"><link linkend="cairo-bool-t"><returnvalue>cairo_bool_t</returnvalue></link>
cairo_region_is_empty (<parameter>const <link linkend="cairo-region-t"><type>cairo_region_t</type></link> *region</parameter>);</programlisting>
<para>Checks whether <parameter>region</parameter>
is empty.</para>
<refsect3 id="cairo-region-is-empty.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>region</para></entry>
<entry role="parameter_description"><para>a <link linkend="cairo-region-t"><type>cairo_region_t</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="cairo-region-is-empty.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if <parameter>region</parameter>
is empty, <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> if it isn't.</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.10">1.10</link></para></refsect2>
<refsect2 id="cairo-region-contains-point" role="function" condition="since:1.10">
<title>cairo_region_contains_point ()</title>
<indexterm zone="cairo-region-contains-point" role="1.10"><primary sortas="region_contains_point">cairo_region_contains_point</primary></indexterm>
<programlisting language="C"><link linkend="cairo-bool-t"><returnvalue>cairo_bool_t</returnvalue></link>
cairo_region_contains_point (<parameter>const <link linkend="cairo-region-t"><type>cairo_region_t</type></link> *region</parameter>,
<parameter><link linkend="int"><type>int</type></link> x</parameter>,
<parameter><link linkend="int"><type>int</type></link> y</parameter>);</programlisting>
<para>Checks whether (<parameter>x</parameter>
, <parameter>y</parameter>
) is contained in <parameter>region</parameter>
.</para>
<refsect3 id="cairo-region-contains-point.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>region</para></entry>
<entry role="parameter_description"><para>a <link linkend="cairo-region-t"><type>cairo_region_t</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>x</para></entry>
<entry role="parameter_description"><para>the x coordinate of a point</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>y</para></entry>
<entry role="parameter_description"><para>the y coordinate of a point</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="cairo-region-contains-point.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if (<parameter>x</parameter>
, <parameter>y</parameter>
) is contained in <parameter>region</parameter>
, <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> if it is not.</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.10">1.10</link></para></refsect2>
<refsect2 id="cairo-region-contains-rectangle" role="function" condition="since:1.10">
<title>cairo_region_contains_rectangle ()</title>
<indexterm zone="cairo-region-contains-rectangle" role="1.10"><primary sortas="region_contains_rectangle">cairo_region_contains_rectangle</primary></indexterm>
<programlisting language="C"><link linkend="cairo-region-overlap-t"><returnvalue>cairo_region_overlap_t</returnvalue></link>
cairo_region_contains_rectangle (<parameter>const <link linkend="cairo-region-t"><type>cairo_region_t</type></link> *region</parameter>,
<parameter>const <link linkend="cairo-rectangle-int-t"><type>cairo_rectangle_int_t</type></link> *rectangle</parameter>);</programlisting>
<para>Checks whether <parameter>rectangle</parameter>
is inside, outside or partially contained
in <parameter>region</parameter>
</para>
<refsect3 id="cairo-region-contains-rectangle.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>region</para></entry>
<entry role="parameter_description"><para>a <link linkend="cairo-region-t"><type>cairo_region_t</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>rectangle</para></entry>
<entry role="parameter_description"><para>a <link linkend="cairo-rectangle-int-t"><type>cairo_rectangle_int_t</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="cairo-region-contains-rectangle.returns" role="returns">
<title>Returns</title>
<para> <link linkend="CAIRO-REGION-OVERLAP-IN:CAPS"><literal>CAIRO_REGION_OVERLAP_IN</literal></link> if <parameter>rectangle</parameter>
is entirely inside <parameter>region</parameter>
,
<link linkend="CAIRO-REGION-OVERLAP-OUT:CAPS"><literal>CAIRO_REGION_OVERLAP_OUT</literal></link> if <parameter>rectangle</parameter>
is entirely outside <parameter>region</parameter>
, or
<link linkend="CAIRO-REGION-OVERLAP-PART:CAPS"><literal>CAIRO_REGION_OVERLAP_PART</literal></link> if <parameter>rectangle</parameter>
is partially inside and partially outside <parameter>region</parameter>
.</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.10">1.10</link></para></refsect2>
<refsect2 id="cairo-region-equal" role="function" condition="since:1.10">
<title>cairo_region_equal ()</title>
<indexterm zone="cairo-region-equal" role="1.10"><primary sortas="region_equal">cairo_region_equal</primary></indexterm>
<programlisting language="C"><link linkend="cairo-bool-t"><returnvalue>cairo_bool_t</returnvalue></link>
cairo_region_equal (<parameter>const <link linkend="cairo-region-t"><type>cairo_region_t</type></link> *a</parameter>,
<parameter>const <link linkend="cairo-region-t"><type>cairo_region_t</type></link> *b</parameter>);</programlisting>
<para>Compares whether region_a is equivalent to region_b. <link linkend="NULL:CAPS"><literal>NULL</literal></link> as an argument
is equal to itself, but not to any non-<link linkend="NULL:CAPS"><literal>NULL</literal></link> region.</para>
<refsect3 id="cairo-region-equal.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>a</para></entry>
<entry role="parameter_description"><para>a <link linkend="cairo-region-t"><type>cairo_region_t</type></link> or <link linkend="NULL:CAPS"><literal>NULL</literal></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>b</para></entry>
<entry role="parameter_description"><para>a <link linkend="cairo-region-t"><type>cairo_region_t</type></link> or <link linkend="NULL:CAPS"><literal>NULL</literal></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="cairo-region-equal.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if both regions contained the same coverage,
<link linkend="FALSE:CAPS"><literal>FALSE</literal></link> if it is not or any region is in an error status.</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.10">1.10</link></para></refsect2>
<refsect2 id="cairo-region-translate" role="function" condition="since:1.10">
<title>cairo_region_translate ()</title>
<indexterm zone="cairo-region-translate" role="1.10"><primary sortas="region_translate">cairo_region_translate</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
cairo_region_translate (<parameter><link linkend="cairo-region-t"><type>cairo_region_t</type></link> *region</parameter>,
<parameter><link linkend="int"><type>int</type></link> dx</parameter>,
<parameter><link linkend="int"><type>int</type></link> dy</parameter>);</programlisting>
<para>Translates <parameter>region</parameter>
by (<parameter>dx</parameter>
, <parameter>dy</parameter>
).</para>
<refsect3 id="cairo-region-translate.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>region</para></entry>
<entry role="parameter_description"><para>a <link linkend="cairo-region-t"><type>cairo_region_t</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>dx</para></entry>
<entry role="parameter_description"><para>Amount to translate in the x direction</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>dy</para></entry>
<entry role="parameter_description"><para>Amount to translate in the y direction</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para role="since">Since: <link linkend="api-index-1.10">1.10</link></para></refsect2>
<refsect2 id="cairo-region-intersect" role="function" condition="since:1.10">
<title>cairo_region_intersect ()</title>
<indexterm zone="cairo-region-intersect" role="1.10"><primary sortas="region_intersect">cairo_region_intersect</primary></indexterm>
<programlisting language="C"><link linkend="cairo-status-t"><returnvalue>cairo_status_t</returnvalue></link>
cairo_region_intersect (<parameter><link linkend="cairo-region-t"><type>cairo_region_t</type></link> *dst</parameter>,
<parameter>const <link linkend="cairo-region-t"><type>cairo_region_t</type></link> *other</parameter>);</programlisting>
<para>Computes the intersection of <parameter>dst</parameter>
with <parameter>other</parameter>
and places the result in <parameter>dst</parameter>
</para>
<refsect3 id="cairo-region-intersect.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>dst</para></entry>
<entry role="parameter_description"><para>a <link linkend="cairo-region-t"><type>cairo_region_t</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>other</para></entry>
<entry role="parameter_description"><para>another <link linkend="cairo-region-t"><type>cairo_region_t</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="cairo-region-intersect.returns" role="returns">
<title>Returns</title>
<para> <link linkend="CAIRO-STATUS-SUCCESS:CAPS"><literal>CAIRO_STATUS_SUCCESS</literal></link> or <link linkend="CAIRO-STATUS-NO-MEMORY:CAPS"><literal>CAIRO_STATUS_NO_MEMORY</literal></link></para>
</refsect3><para role="since">Since: <link linkend="api-index-1.10">1.10</link></para></refsect2>
<refsect2 id="cairo-region-intersect-rectangle" role="function" condition="since:1.10">
<title>cairo_region_intersect_rectangle ()</title>
<indexterm zone="cairo-region-intersect-rectangle" role="1.10"><primary sortas="region_intersect_rectangle">cairo_region_intersect_rectangle</primary></indexterm>
<programlisting language="C"><link linkend="cairo-status-t"><returnvalue>cairo_status_t</returnvalue></link>
cairo_region_intersect_rectangle (<parameter><link linkend="cairo-region-t"><type>cairo_region_t</type></link> *dst</parameter>,
<parameter>const <link linkend="cairo-rectangle-int-t"><type>cairo_rectangle_int_t</type></link> *rectangle</parameter>);</programlisting>
<para>Computes the intersection of <parameter>dst</parameter>
with <parameter>rectangle</parameter>
and places the
result in <parameter>dst</parameter>
</para>
<refsect3 id="cairo-region-intersect-rectangle.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>dst</para></entry>
<entry role="parameter_description"><para>a <link linkend="cairo-region-t"><type>cairo_region_t</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>rectangle</para></entry>
<entry role="parameter_description"><para>a <link linkend="cairo-rectangle-int-t"><type>cairo_rectangle_int_t</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="cairo-region-intersect-rectangle.returns" role="returns">
<title>Returns</title>
<para> <link linkend="CAIRO-STATUS-SUCCESS:CAPS"><literal>CAIRO_STATUS_SUCCESS</literal></link> or <link linkend="CAIRO-STATUS-NO-MEMORY:CAPS"><literal>CAIRO_STATUS_NO_MEMORY</literal></link></para>
</refsect3><para role="since">Since: <link linkend="api-index-1.10">1.10</link></para></refsect2>
<refsect2 id="cairo-region-subtract" role="function" condition="since:1.10">
<title>cairo_region_subtract ()</title>
<indexterm zone="cairo-region-subtract" role="1.10"><primary sortas="region_subtract">cairo_region_subtract</primary></indexterm>
<programlisting language="C"><link linkend="cairo-status-t"><returnvalue>cairo_status_t</returnvalue></link>
cairo_region_subtract (<parameter><link linkend="cairo-region-t"><type>cairo_region_t</type></link> *dst</parameter>,
<parameter>const <link linkend="cairo-region-t"><type>cairo_region_t</type></link> *other</parameter>);</programlisting>
<para>Subtracts <parameter>other</parameter>
from <parameter>dst</parameter>
and places the result in <parameter>dst</parameter>
</para>
<refsect3 id="cairo-region-subtract.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>dst</para></entry>
<entry role="parameter_description"><para>a <link linkend="cairo-region-t"><type>cairo_region_t</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>other</para></entry>
<entry role="parameter_description"><para>another <link linkend="cairo-region-t"><type>cairo_region_t</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="cairo-region-subtract.returns" role="returns">
<title>Returns</title>
<para> <link linkend="CAIRO-STATUS-SUCCESS:CAPS"><literal>CAIRO_STATUS_SUCCESS</literal></link> or <link linkend="CAIRO-STATUS-NO-MEMORY:CAPS"><literal>CAIRO_STATUS_NO_MEMORY</literal></link></para>
</refsect3><para role="since">Since: <link linkend="api-index-1.10">1.10</link></para></refsect2>
<refsect2 id="cairo-region-subtract-rectangle" role="function" condition="since:1.10">
<title>cairo_region_subtract_rectangle ()</title>
<indexterm zone="cairo-region-subtract-rectangle" role="1.10"><primary sortas="region_subtract_rectangle">cairo_region_subtract_rectangle</primary></indexterm>
<programlisting language="C"><link linkend="cairo-status-t"><returnvalue>cairo_status_t</returnvalue></link>
cairo_region_subtract_rectangle (<parameter><link linkend="cairo-region-t"><type>cairo_region_t</type></link> *dst</parameter>,
<parameter>const <link linkend="cairo-rectangle-int-t"><type>cairo_rectangle_int_t</type></link> *rectangle</parameter>);</programlisting>
<para>Subtracts <parameter>rectangle</parameter>
from <parameter>dst</parameter>
and places the result in <parameter>dst</parameter>
</para>
<refsect3 id="cairo-region-subtract-rectangle.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>dst</para></entry>
<entry role="parameter_description"><para>a <link linkend="cairo-region-t"><type>cairo_region_t</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>rectangle</para></entry>
<entry role="parameter_description"><para>a <link linkend="cairo-rectangle-int-t"><type>cairo_rectangle_int_t</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="cairo-region-subtract-rectangle.returns" role="returns">
<title>Returns</title>
<para> <link linkend="CAIRO-STATUS-SUCCESS:CAPS"><literal>CAIRO_STATUS_SUCCESS</literal></link> or <link linkend="CAIRO-STATUS-NO-MEMORY:CAPS"><literal>CAIRO_STATUS_NO_MEMORY</literal></link></para>
</refsect3><para role="since">Since: <link linkend="api-index-1.10">1.10</link></para></refsect2>
<refsect2 id="cairo-region-union" role="function" condition="since:1.10">
<title>cairo_region_union ()</title>
<indexterm zone="cairo-region-union" role="1.10"><primary sortas="region_union">cairo_region_union</primary></indexterm>
<programlisting language="C"><link linkend="cairo-status-t"><returnvalue>cairo_status_t</returnvalue></link>
cairo_region_union (<parameter><link linkend="cairo-region-t"><type>cairo_region_t</type></link> *dst</parameter>,
<parameter>const <link linkend="cairo-region-t"><type>cairo_region_t</type></link> *other</parameter>);</programlisting>
<para>Computes the union of <parameter>dst</parameter>
with <parameter>other</parameter>
and places the result in <parameter>dst</parameter>
</para>
<refsect3 id="cairo-region-union.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>dst</para></entry>
<entry role="parameter_description"><para>a <link linkend="cairo-region-t"><type>cairo_region_t</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>other</para></entry>
<entry role="parameter_description"><para>another <link linkend="cairo-region-t"><type>cairo_region_t</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="cairo-region-union.returns" role="returns">
<title>Returns</title>
<para> <link linkend="CAIRO-STATUS-SUCCESS:CAPS"><literal>CAIRO_STATUS_SUCCESS</literal></link> or <link linkend="CAIRO-STATUS-NO-MEMORY:CAPS"><literal>CAIRO_STATUS_NO_MEMORY</literal></link></para>
</refsect3><para role="since">Since: <link linkend="api-index-1.10">1.10</link></para></refsect2>
<refsect2 id="cairo-region-union-rectangle" role="function" condition="since:1.10">
<title>cairo_region_union_rectangle ()</title>
<indexterm zone="cairo-region-union-rectangle" role="1.10"><primary sortas="region_union_rectangle">cairo_region_union_rectangle</primary></indexterm>
<programlisting language="C"><link linkend="cairo-status-t"><returnvalue>cairo_status_t</returnvalue></link>
cairo_region_union_rectangle (<parameter><link linkend="cairo-region-t"><type>cairo_region_t</type></link> *dst</parameter>,
<parameter>const <link linkend="cairo-rectangle-int-t"><type>cairo_rectangle_int_t</type></link> *rectangle</parameter>);</programlisting>
<para>Computes the union of <parameter>dst</parameter>
with <parameter>rectangle</parameter>
and places the result in <parameter>dst</parameter>
.</para>
<refsect3 id="cairo-region-union-rectangle.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>dst</para></entry>
<entry role="parameter_description"><para>a <link linkend="cairo-region-t"><type>cairo_region_t</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>rectangle</para></entry>
<entry role="parameter_description"><para>a <link linkend="cairo-rectangle-int-t"><type>cairo_rectangle_int_t</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="cairo-region-union-rectangle.returns" role="returns">
<title>Returns</title>
<para> <link linkend="CAIRO-STATUS-SUCCESS:CAPS"><literal>CAIRO_STATUS_SUCCESS</literal></link> or <link linkend="CAIRO-STATUS-NO-MEMORY:CAPS"><literal>CAIRO_STATUS_NO_MEMORY</literal></link></para>
</refsect3><para role="since">Since: <link linkend="api-index-1.10">1.10</link></para></refsect2>
<refsect2 id="cairo-region-xor" role="function" condition="since:1.10">
<title>cairo_region_xor ()</title>
<indexterm zone="cairo-region-xor" role="1.10"><primary sortas="region_xor">cairo_region_xor</primary></indexterm>
<programlisting language="C"><link linkend="cairo-status-t"><returnvalue>cairo_status_t</returnvalue></link>
cairo_region_xor (<parameter><link linkend="cairo-region-t"><type>cairo_region_t</type></link> *dst</parameter>,
<parameter>const <link linkend="cairo-region-t"><type>cairo_region_t</type></link> *other</parameter>);</programlisting>
<para>Computes the exclusive difference of <parameter>dst</parameter>
with <parameter>other</parameter>
and places the
result in <parameter>dst</parameter>
. That is, <parameter>dst</parameter>
will be set to contain all areas that
are either in <parameter>dst</parameter>
or in <parameter>other</parameter>
, but not in both.</para>
<refsect3 id="cairo-region-xor.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>dst</para></entry>
<entry role="parameter_description"><para>a <link linkend="cairo-region-t"><type>cairo_region_t</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>other</para></entry>
<entry role="parameter_description"><para>another <link linkend="cairo-region-t"><type>cairo_region_t</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="cairo-region-xor.returns" role="returns">
<title>Returns</title>
<para> <link linkend="CAIRO-STATUS-SUCCESS:CAPS"><literal>CAIRO_STATUS_SUCCESS</literal></link> or <link linkend="CAIRO-STATUS-NO-MEMORY:CAPS"><literal>CAIRO_STATUS_NO_MEMORY</literal></link></para>
</refsect3><para role="since">Since: <link linkend="api-index-1.10">1.10</link></para></refsect2>
<refsect2 id="cairo-region-xor-rectangle" role="function" condition="since:1.10">
<title>cairo_region_xor_rectangle ()</title>
<indexterm zone="cairo-region-xor-rectangle" role="1.10"><primary sortas="region_xor_rectangle">cairo_region_xor_rectangle</primary></indexterm>
<programlisting language="C"><link linkend="cairo-status-t"><returnvalue>cairo_status_t</returnvalue></link>
cairo_region_xor_rectangle (<parameter><link linkend="cairo-region-t"><type>cairo_region_t</type></link> *dst</parameter>,
<parameter>const <link linkend="cairo-rectangle-int-t"><type>cairo_rectangle_int_t</type></link> *rectangle</parameter>);</programlisting>
<para>Computes the exclusive difference of <parameter>dst</parameter>
with <parameter>rectangle</parameter>
and places the
result in <parameter>dst</parameter>
. That is, <parameter>dst</parameter>
will be set to contain all areas that are
either in <parameter>dst</parameter>
or in <parameter>rectangle</parameter>
, but not in both.</para>
<refsect3 id="cairo-region-xor-rectangle.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>dst</para></entry>
<entry role="parameter_description"><para>a <link linkend="cairo-region-t"><type>cairo_region_t</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>rectangle</para></entry>
<entry role="parameter_description"><para>a <link linkend="cairo-rectangle-int-t"><type>cairo_rectangle_int_t</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="cairo-region-xor-rectangle.returns" role="returns">
<title>Returns</title>
<para> <link linkend="CAIRO-STATUS-SUCCESS:CAPS"><literal>CAIRO_STATUS_SUCCESS</literal></link> or <link linkend="CAIRO-STATUS-NO-MEMORY:CAPS"><literal>CAIRO_STATUS_NO_MEMORY</literal></link></para>
</refsect3><para role="since">Since: <link linkend="api-index-1.10">1.10</link></para></refsect2>
</refsect1>
<refsect1 id="cairo-Regions.other_details" role="details">
<title role="details.title">Types and Values</title>
<refsect2 id="cairo-region-t" role="typedef" condition="since:1.10">
<title>cairo_region_t</title>
<indexterm zone="cairo-region-t" role="1.10"><primary sortas="region_t">cairo_region_t</primary></indexterm>
<programlisting language="C">typedef struct _cairo_region cairo_region_t;
</programlisting>
<para>A <link linkend="cairo-region-t"><type>cairo_region_t</type></link> represents a set of integer-aligned rectangles.</para>
<para>It allows set-theoretical operations like <link linkend="cairo-region-union"><function>cairo_region_union()</function></link> and
<link linkend="cairo-region-intersect"><function>cairo_region_intersect()</function></link> to be performed on them.</para>
<para>Memory management of <link linkend="cairo-region-t"><type>cairo_region_t</type></link> is done with
<link linkend="cairo-region-reference"><function>cairo_region_reference()</function></link> and <link linkend="cairo-region-destroy"><function>cairo_region_destroy()</function></link>.</para>
<para role="since">Since: <link linkend="api-index-1.10">1.10</link></para></refsect2>
<refsect2 id="cairo-region-overlap-t" role="enum" condition="since:1.10">
<title>enum cairo_region_overlap_t</title>
<indexterm zone="cairo-region-overlap-t" role="1.10"><primary sortas="region_overlap_t">cairo_region_overlap_t</primary></indexterm>
<para>Used as the return value for <link linkend="cairo-region-contains-rectangle"><function>cairo_region_contains_rectangle()</function></link>.</para>
<refsect3 id="cairo-region-overlap-t.members" role="enum_members">
<title>Members</title>
<informaltable role="enum_members_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="enum_members_name" colwidth="300px"/>
<colspec colname="enum_members_description"/>
<colspec colname="enum_members_annotations" colwidth="200px"/>
<tbody>
<row role="constant"><entry role="enum_member_name"><para id="CAIRO-REGION-OVERLAP-IN:CAPS">CAIRO_REGION_OVERLAP_IN</para></entry>
<entry role="enum_member_description"><para>The contents are entirely inside the region. (Since 1.10)</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="CAIRO-REGION-OVERLAP-OUT:CAPS">CAIRO_REGION_OVERLAP_OUT</para></entry>
<entry role="enum_member_description"><para>The contents are entirely outside the region. (Since 1.10)</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="CAIRO-REGION-OVERLAP-PART:CAPS">CAIRO_REGION_OVERLAP_PART</para></entry>
<entry role="enum_member_description"><para>The contents are partially inside and
partially outside the region. (Since 1.10)</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
</tbody></tgroup></informaltable>
</refsect3><para role="since">Since: <link linkend="api-index-1.10">1.10</link></para></refsect2>
</refsect1>
</refentry>
|