/usr/share/gtk-doc/html/libvips/libvips-VipsRegion.html is in libvips-doc 8.2.2-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>VipsRegion: VIPS Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="VIPS Reference Manual">
<link rel="up" href="ch02.html" title="Core VIPS API">
<link rel="prev" href="libvips-memory.html" title="memory">
<link rel="next" href="libvips-type.html" title="type">
<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span>
<a href="#libvips-VipsRegion.description" class="shortcut">Description</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="ch02.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="libvips-memory.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="libvips-type.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="libvips-VipsRegion"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="libvips-VipsRegion.top_of_page"></a>VipsRegion</span></h2>
<p>VipsRegion — small, rectangular parts of images</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="libvips-VipsRegion.stability-level"></a><h2>Stability Level</h2>
<acronym title="The intention of a Stable interface is to enable arbitrary third parties to
develop applications to these interfaces, release them, and have confidence that
they will run on all minor releases of the product (after the one in which the
interface was introduced, and within the same major release). Even at a major
release, incompatible changes are expected to be rare, and to have strong
justifications.
"><span class="acronym">Stable</span></acronym>, unless otherwise indicated
</div>
<div class="refsect1">
<a name="libvips-VipsRegion.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<span class="returnvalue">VipsRegion</span> *
</td>
<td class="function_name">
<a class="link" href="libvips-VipsRegion.html#vips-region-new" title="vips_region_new ()">vips_region_new</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="libvips-VipsRegion.html#vips-region-buffer" title="vips_region_buffer ()">vips_region_buffer</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="libvips-VipsRegion.html#vips-region-image" title="vips_region_image ()">vips_region_image</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="libvips-VipsRegion.html#vips-region-region" title="vips_region_region ()">vips_region_region</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="libvips-VipsRegion.html#vips-region-equalsregion" title="vips_region_equalsregion ()">vips_region_equalsregion</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="libvips-VipsRegion.html#vips-region-position" title="vips_region_position ()">vips_region_position</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="libvips-VipsRegion.html#vips-region-paint" title="vips_region_paint ()">vips_region_paint</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="libvips-VipsRegion.html#vips-region-paint-pel" title="vips_region_paint_pel ()">vips_region_paint_pel</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="libvips-VipsRegion.html#vips-region-black" title="vips_region_black ()">vips_region_black</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="libvips-VipsRegion.html#vips-region-copy" title="vips_region_copy ()">vips_region_copy</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="libvips-VipsRegion.html#vips-region-shrink" title="vips_region_shrink ()">vips_region_shrink</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="libvips-VipsRegion.html#vips-region-prepare" title="vips_region_prepare ()">vips_region_prepare</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="libvips-VipsRegion.html#vips-region-prepare-to" title="vips_region_prepare_to ()">vips_region_prepare_to</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="libvips-VipsRegion.html#vips-region-prepare-many" title="vips_region_prepare_many ()">vips_region_prepare_many</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="libvips-VipsRegion.html#vips-region-invalidate" title="vips_region_invalidate ()">vips_region_invalidate</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="libvips-VipsRegion.html#vips-region-dump-all" title="vips_region_dump_all ()">vips_region_dump_all</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="libvips-VipsRegion.html#VIPS-REGION-LSKIP:CAPS" title="VIPS_REGION_LSKIP()">VIPS_REGION_LSKIP</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="libvips-VipsRegion.html#VIPS-REGION-N-ELEMENTS:CAPS" title="VIPS_REGION_N_ELEMENTS()">VIPS_REGION_N_ELEMENTS</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="libvips-VipsRegion.html#VIPS-REGION-SIZEOF-LINE:CAPS" title="VIPS_REGION_SIZEOF_LINE()">VIPS_REGION_SIZEOF_LINE</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="libvips-VipsRegion.html#VIPS-REGION-ADDR:CAPS" title="VIPS_REGION_ADDR()">VIPS_REGION_ADDR</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="libvips-VipsRegion.html#VIPS-REGION-ADDR-TOPLEFT:CAPS" title="VIPS_REGION_ADDR_TOPLEFT()">VIPS_REGION_ADDR_TOPLEFT</a><span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="libvips-VipsRegion.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include <vips/vips.h>
</pre>
</div>
<div class="refsect1">
<a name="libvips-VipsRegion.description"></a><h2>Description</h2>
<p>A <span class="type">VipsRegion</span> is a small part of an image and some pixels. You use regions to
read pixels out of images without having to have the whole image in memory
at once.</p>
<p>A region can be a memory buffer, part of a memory-mapped file, part of some
other image, or part of some other region.</p>
<p>Regions must be created, used and freed all within the same thread, since
they can reference private per-thread caches. VIPS sanity-checks region
ownership in various places, so you are likely to see <code class="function">g_assert()</code> errors if
you don't follow this rule.</p>
<p>There
is API to transfer ownership of regions between threads, but hopefully this
is only needed within VIPS, so we don't expose it. Hopefully.</p>
</div>
<div class="refsect1">
<a name="libvips-VipsRegion.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="vips-region-new"></a><h3>vips_region_new ()</h3>
<pre class="programlisting"><span class="returnvalue">VipsRegion</span> *
vips_region_new (<em class="parameter"><code><span class="type">VipsImage</span> *image</code></em>);</pre>
<p>Create a region. <span class="type">VipsRegion</span> s start out empty, you need to call
<a class="link" href="libvips-VipsRegion.html#vips-region-prepare" title="vips_region_prepare ()"><code class="function">vips_region_prepare()</code></a> to fill them with pixels.</p>
<p>See also: <a class="link" href="libvips-VipsRegion.html#vips-region-prepare" title="vips_region_prepare ()"><code class="function">vips_region_prepare()</code></a>.</p>
<div class="refsect3">
<a name="id-1.3.9.7.2.6"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>image</p></td>
<td class="parameter_description"><p>image to create this region on</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="vips-region-buffer"></a><h3>vips_region_buffer ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
vips_region_buffer (<em class="parameter"><code><span class="type">VipsRegion</span> *reg</code></em>,
<em class="parameter"><code><a class="link" href="libvips-rect.html#VipsRect" title="VipsRect"><span class="type">VipsRect</span></a> *r</code></em>);</pre>
<p>The region is transformed so that at least <em class="parameter"><code>r</code></em>
pixels are available as a
memory buffer.</p>
<div class="refsect3">
<a name="id-1.3.9.7.3.5"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>reg</p></td>
<td class="parameter_description"><p>region to operate upon</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>r</p></td>
<td class="parameter_description"><p><a class="link" href="libvips-rect.html#VipsRect" title="VipsRect"><span class="type">VipsRect</span></a> of pixels you need to be able to address</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.9.7.3.6"></a><h4>Returns</h4>
<p> 0 on success, or -1 for error.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="vips-region-image"></a><h3>vips_region_image ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
vips_region_image (<em class="parameter"><code><span class="type">VipsRegion</span> *reg</code></em>,
<em class="parameter"><code><a class="link" href="libvips-rect.html#VipsRect" title="VipsRect"><span class="type">VipsRect</span></a> *r</code></em>);</pre>
<p>The region is transformed so that at least <em class="parameter"><code>r</code></em>
pixels are available directly
from the image. The image needs to be a memory buffer or represent a file
on disc that has been mapped or can be mapped.</p>
<div class="refsect3">
<a name="id-1.3.9.7.4.5"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>reg</p></td>
<td class="parameter_description"><p>region to operate upon</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>r</p></td>
<td class="parameter_description"><p><a class="link" href="libvips-rect.html#VipsRect" title="VipsRect"><span class="type">VipsRect</span></a> of pixels you need to be able to address</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.9.7.4.6"></a><h4>Returns</h4>
<p> 0 on success, or -1 for error.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="vips-region-region"></a><h3>vips_region_region ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
vips_region_region (<em class="parameter"><code><span class="type">VipsRegion</span> *reg</code></em>,
<em class="parameter"><code><span class="type">VipsRegion</span> *dest</code></em>,
<em class="parameter"><code><a class="link" href="libvips-rect.html#VipsRect" title="VipsRect"><span class="type">VipsRect</span></a> *r</code></em>,
<em class="parameter"><code><span class="type">int</span> x</code></em>,
<em class="parameter"><code><span class="type">int</span> y</code></em>);</pre>
<p>Make <a class="link" href="libvips-VipsRegion.html#VIPS-REGION-ADDR:CAPS" title="VIPS_REGION_ADDR()"><code class="function">VIPS_REGION_ADDR()</code></a> on <em class="parameter"><code>reg</code></em>
go to <em class="parameter"><code>dest</code></em>
instead. </p>
<p><em class="parameter"><code>r</code></em>
is the part of <em class="parameter"><code>reg</code></em>
which you want to be able to address (this
effectively becomes the valid field), (<em class="parameter"><code>x</code></em>
, <em class="parameter"><code>y</code></em>
) is the top LH corner of the
corresponding area in <em class="parameter"><code>dest</code></em>
.</p>
<p>Performs all clipping necessary to ensure that <em class="parameter"><code>reg->valid</code></em>
is indeed
valid.</p>
<p>If the region we attach to is modified, we can be left with dangling
pointers! If the region we attach to is on another image, the two images
must have
the same sizeof( pel ).</p>
<div class="refsect3">
<a name="id-1.3.9.7.5.8"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>reg</p></td>
<td class="parameter_description"><p>region to operate upon</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>dest</p></td>
<td class="parameter_description"><p>region to connect to</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>r</p></td>
<td class="parameter_description"><p><a class="link" href="libvips-rect.html#VipsRect" title="VipsRect"><span class="type">VipsRect</span></a> of pixels you need to be able to address</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>x</p></td>
<td class="parameter_description"><p>postion of <em class="parameter"><code>r</code></em>
in <em class="parameter"><code>dest</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>y</p></td>
<td class="parameter_description"><p>postion of <em class="parameter"><code>r</code></em>
in <em class="parameter"><code>dest</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.9.7.5.9"></a><h4>Returns</h4>
<p> 0 on success, or -1 for error.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="vips-region-equalsregion"></a><h3>vips_region_equalsregion ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
vips_region_equalsregion (<em class="parameter"><code><span class="type">VipsRegion</span> *reg1</code></em>,
<em class="parameter"><code><span class="type">VipsRegion</span> *reg2</code></em>);</pre>
<p>Do two regions point to the same piece of image? ie. </p>
<div class="informalexample"><pre class="programlisting">
VIPS_REGION_ADDR( reg1, x, y ) == VIPS_REGION_ADDR( reg2, x, y ) &&
*VIPS_REGION_ADDR( reg1, x, y ) ==
*VIPS_REGION_ADDR( reg2, x, y ) for all x, y, reg1, reg2.
</pre></div>
<p></p>
<div class="refsect3">
<a name="id-1.3.9.7.6.7"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>reg1</p></td>
<td class="parameter_description"><p>region to test</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>reg2</p></td>
<td class="parameter_description"><p>region to test</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.9.7.6.8"></a><h4>Returns</h4>
<p> non-zero on equality.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="vips-region-position"></a><h3>vips_region_position ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
vips_region_position (<em class="parameter"><code><span class="type">VipsRegion</span> *reg</code></em>,
<em class="parameter"><code><span class="type">int</span> x</code></em>,
<em class="parameter"><code><span class="type">int</span> y</code></em>);</pre>
<p>Set the position of a region. This only affects reg->valid, ie. the way
pixels are addressed, not reg->data, the pixels which are addressed. Clip
against the size of the image. Do not allow negative positions, or
positions outside the image.</p>
<div class="refsect3">
<a name="id-1.3.9.7.7.5"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>reg</p></td>
<td class="parameter_description"><p>region to operate upon</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>x</p></td>
<td class="parameter_description"><p>position to move to</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>y</p></td>
<td class="parameter_description"><p>position to move to</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.9.7.7.6"></a><h4>Returns</h4>
<p> 0 on success, or -1 for error.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="vips-region-paint"></a><h3>vips_region_paint ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
vips_region_paint (<em class="parameter"><code><span class="type">VipsRegion</span> *reg</code></em>,
<em class="parameter"><code><a class="link" href="libvips-rect.html#VipsRect" title="VipsRect"><span class="type">VipsRect</span></a> *r</code></em>,
<em class="parameter"><code><span class="type">int</span> value</code></em>);</pre>
<p>Paints <em class="parameter"><code>value</code></em>
into <em class="parameter"><code>reg</code></em>
covering rectangle <em class="parameter"><code>r</code></em>
. For int images, <em class="parameter"><code>value</code></em>
is
passed to <code class="function">memset()</code>, so it usually needs to be 0 or 255. For float images,
value is cast to a float and copied in to each band element. </p>
<p><em class="parameter"><code>r</code></em>
is clipped against
<em class="parameter"><code>reg->valid</code></em>
.</p>
<p>See also: <a class="link" href="libvips-VipsRegion.html#vips-region-black" title="vips_region_black ()"><code class="function">vips_region_black()</code></a>.</p>
<div class="refsect3">
<a name="id-1.3.9.7.8.7"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>reg</p></td>
<td class="parameter_description"><p>region to operate upon</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>r</p></td>
<td class="parameter_description"><p>area to paint</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>value</p></td>
<td class="parameter_description"><p>value to paint</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="vips-region-paint-pel"></a><h3>vips_region_paint_pel ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
vips_region_paint_pel (<em class="parameter"><code><span class="type">VipsRegion</span> *reg</code></em>,
<em class="parameter"><code><a class="link" href="libvips-rect.html#VipsRect" title="VipsRect"><span class="type">VipsRect</span></a> *r</code></em>,
<em class="parameter"><code><a class="link" href="libvips-basic.html#VipsPel" title="VipsPel"><span class="type">VipsPel</span></a> *ink</code></em>);</pre>
<p>Paints <em class="parameter"><code>ink</code></em>
into <em class="parameter"><code>reg</code></em>
covering rectangle <em class="parameter"><code>r</code></em>
. <em class="parameter"><code>r</code></em>
is clipped against
<em class="parameter"><code>reg->valid</code></em>
.</p>
<p><em class="parameter"><code>ink</code></em>
should be a byte array of the same size as an image pixel containing
the binary value to write into the pixels.</p>
<p>See also: <a class="link" href="libvips-VipsRegion.html#vips-region-paint" title="vips_region_paint ()"><code class="function">vips_region_paint()</code></a>.</p>
<div class="refsect3">
<a name="id-1.3.9.7.9.7"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>reg</p></td>
<td class="parameter_description"><p>region to operate upon</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>r</p></td>
<td class="parameter_description"><p>area to paint</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>ink</p></td>
<td class="parameter_description"><p>value to paint</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="vips-region-black"></a><h3>vips_region_black ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
vips_region_black (<em class="parameter"><code><span class="type">VipsRegion</span> *reg</code></em>);</pre>
<p>Paints 0 into the valid part of <em class="parameter"><code>reg</code></em>
.</p>
<p>See also: <a class="link" href="libvips-VipsRegion.html#vips-region-paint" title="vips_region_paint ()"><code class="function">vips_region_paint()</code></a>.</p>
<div class="refsect3">
<a name="id-1.3.9.7.10.6"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>reg</p></td>
<td class="parameter_description"><p>region to operate upon</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="vips-region-copy"></a><h3>vips_region_copy ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
vips_region_copy (<em class="parameter"><code><span class="type">VipsRegion</span> *reg</code></em>,
<em class="parameter"><code><span class="type">VipsRegion</span> *dest</code></em>,
<em class="parameter"><code><a class="link" href="libvips-rect.html#VipsRect" title="VipsRect"><span class="type">VipsRect</span></a> *r</code></em>,
<em class="parameter"><code><span class="type">int</span> x</code></em>,
<em class="parameter"><code><span class="type">int</span> y</code></em>);</pre>
<p>Copy from one region to another. Copy area <em class="parameter"><code>r</code></em>
from inside <em class="parameter"><code>reg</code></em>
to <em class="parameter"><code>dest</code></em>
,
positioning the area of pixels at <em class="parameter"><code>x</code></em>
, <em class="parameter"><code>y</code></em>
. The two regions must have pixels
which are the same size.</p>
<p>See also: <a class="link" href="libvips-VipsRegion.html#vips-region-paint" title="vips_region_paint ()"><code class="function">vips_region_paint()</code></a>.</p>
<div class="refsect3">
<a name="id-1.3.9.7.11.6"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>reg</p></td>
<td class="parameter_description"><p>source region </p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>dest</p></td>
<td class="parameter_description"><p>destination region </p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>r</p></td>
<td class="parameter_description"><p><a class="link" href="libvips-rect.html#VipsRect" title="VipsRect"><span class="type">VipsRect</span></a> of pixels you need to copy</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>x</p></td>
<td class="parameter_description"><p>postion of <em class="parameter"><code>r</code></em>
in <em class="parameter"><code>dest</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>y</p></td>
<td class="parameter_description"><p>postion of <em class="parameter"><code>r</code></em>
in <em class="parameter"><code>dest</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="vips-region-shrink"></a><h3>vips_region_shrink ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
vips_region_shrink (<em class="parameter"><code><span class="type">VipsRegion</span> *from</code></em>,
<em class="parameter"><code><span class="type">VipsRegion</span> *to</code></em>,
<em class="parameter"><code><a class="link" href="libvips-rect.html#VipsRect" title="VipsRect"><span class="type">VipsRect</span></a> *target</code></em>);</pre>
<p>Write the pixels <em class="parameter"><code>target</code></em>
in <em class="parameter"><code>to</code></em>
from the x2 larger area in <em class="parameter"><code>from</code></em>
.
Non-complex uncoded images and LABQ only.</p>
<p>See also: <a class="link" href="libvips-VipsRegion.html#vips-region-copy" title="vips_region_copy ()"><code class="function">vips_region_copy()</code></a>.</p>
<div class="refsect3">
<a name="id-1.3.9.7.12.6"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>from</p></td>
<td class="parameter_description"><p>source region </p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>to</p></td>
<td class="parameter_description"><p>destination region </p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>target</p></td>
<td class="parameter_description"><p><a class="link" href="libvips-rect.html#VipsRect" title="VipsRect"><span class="type">VipsRect</span></a> of pixels you need to copy</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="vips-region-prepare"></a><h3>vips_region_prepare ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
vips_region_prepare (<em class="parameter"><code><span class="type">VipsRegion</span> *reg</code></em>,
<em class="parameter"><code><a class="link" href="libvips-rect.html#VipsRect" title="VipsRect"><span class="type">VipsRect</span></a> *r</code></em>);</pre>
<p>vips_region_prepare() fills <em class="parameter"><code>reg</code></em>
with pixels. After calling,
you can address at least the area <em class="parameter"><code>r</code></em>
with <a class="link" href="libvips-VipsRegion.html#VIPS-REGION-ADDR:CAPS" title="VIPS_REGION_ADDR()"><code class="function">VIPS_REGION_ADDR()</code></a> and get
valid pixels.</p>
<p>vips_region_prepare() runs in-line, that is, computation is done by
the calling thread, no new threads are involved, and computation
blocks until the pixels are ready.</p>
<p>Use <a class="link" href="libvips-generate.html#vips-sink-screen" title="vips_sink_screen ()"><code class="function">vips_sink_screen()</code></a> to calculate an area of pixels in the
background.</p>
<p>See also: <a class="link" href="libvips-generate.html#vips-sink-screen" title="vips_sink_screen ()"><code class="function">vips_sink_screen()</code></a>,
<a class="link" href="libvips-VipsRegion.html#vips-region-prepare-to" title="vips_region_prepare_to ()"><code class="function">vips_region_prepare_to()</code></a>.</p>
<div class="refsect3">
<a name="id-1.3.9.7.13.8"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>reg</p></td>
<td class="parameter_description"><p>region to prepare</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>r</p></td>
<td class="parameter_description"><p><a class="link" href="libvips-rect.html#VipsRect" title="VipsRect"><span class="type">VipsRect</span></a> of pixels you need to be able to address</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.9.7.13.9"></a><h4>Returns</h4>
<p> 0 on success, or -1 on error.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="vips-region-prepare-to"></a><h3>vips_region_prepare_to ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
vips_region_prepare_to (<em class="parameter"><code><span class="type">VipsRegion</span> *reg</code></em>,
<em class="parameter"><code><span class="type">VipsRegion</span> *dest</code></em>,
<em class="parameter"><code><a class="link" href="libvips-rect.html#VipsRect" title="VipsRect"><span class="type">VipsRect</span></a> *r</code></em>,
<em class="parameter"><code><span class="type">int</span> x</code></em>,
<em class="parameter"><code><span class="type">int</span> y</code></em>);</pre>
<p>Like <a class="link" href="libvips-VipsRegion.html#vips-region-prepare" title="vips_region_prepare ()"><code class="function">vips_region_prepare()</code></a>: fill <em class="parameter"><code>reg</code></em>
with data, ready to be read from by
our caller. Unlike <a class="link" href="libvips-VipsRegion.html#vips-region-prepare" title="vips_region_prepare ()"><code class="function">vips_region_prepare()</code></a>, rather than allocating memory
local to <em class="parameter"><code>reg</code></em>
for the result, we guarantee that we will fill the pixels
in <em class="parameter"><code>dest</code></em>
at offset <em class="parameter"><code>x</code></em>
, <em class="parameter"><code>y</code></em>
. In other words, we generate an extra copy
operation if necessary. </p>
<p>Also unlike <a class="link" href="libvips-VipsRegion.html#vips-region-prepare" title="vips_region_prepare ()"><code class="function">vips_region_prepare()</code></a>, <em class="parameter"><code>dest</code></em>
is not set up for writing for
you with
<a class="link" href="libvips-VipsRegion.html#vips-region-buffer" title="vips_region_buffer ()"><code class="function">vips_region_buffer()</code></a>. You can
point <em class="parameter"><code>dest</code></em>
at anything, and pixels really will be written there.
This makes <a class="link" href="libvips-VipsRegion.html#vips-region-prepare-to" title="vips_region_prepare_to ()"><code class="function">vips_region_prepare_to()</code></a> useful for making the ends of
pipelines, since
it (effectively) makes a break in the pipe.</p>
<p>See also: <a class="link" href="libvips-VipsRegion.html#vips-region-prepare" title="vips_region_prepare ()"><code class="function">vips_region_prepare()</code></a>, <a class="link" href="libvips-generate.html#vips-sink-disc" title="vips_sink_disc ()"><code class="function">vips_sink_disc()</code></a>.</p>
<div class="refsect3">
<a name="id-1.3.9.7.14.7"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>reg</p></td>
<td class="parameter_description"><p>region to prepare</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>dest</p></td>
<td class="parameter_description"><p>region to write to</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>r</p></td>
<td class="parameter_description"><p><a class="link" href="libvips-rect.html#VipsRect" title="VipsRect"><span class="type">VipsRect</span></a> of pixels you need to be able to address</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>x</p></td>
<td class="parameter_description"><p>postion of <em class="parameter"><code>r</code></em>
in <em class="parameter"><code>dest</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>y</p></td>
<td class="parameter_description"><p>postion of <em class="parameter"><code>r</code></em>
in <em class="parameter"><code>dest</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.9.7.14.8"></a><h4>Returns</h4>
<p> 0 on success, or -1 on error</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="vips-region-prepare-many"></a><h3>vips_region_prepare_many ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
vips_region_prepare_many (<em class="parameter"><code><span class="type">VipsRegion</span> **reg</code></em>,
<em class="parameter"><code><a class="link" href="libvips-rect.html#VipsRect" title="VipsRect"><span class="type">VipsRect</span></a> *r</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="vips-region-invalidate"></a><h3>vips_region_invalidate ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
vips_region_invalidate (<em class="parameter"><code><span class="type">VipsRegion</span> *reg</code></em>);</pre>
<p>Mark a region as containing invalid pixels. Calling this function means
that the next time <a class="link" href="libvips-VipsRegion.html#vips-region-prepare" title="vips_region_prepare ()"><code class="function">vips_region_prepare()</code></a> is called, the region will be
recalculated.</p>
<p>This is faster than calling <a class="link" href="libvips-VipsImage.html#vips-image-invalidate-all" title="vips_image_invalidate_all ()"><code class="function">vips_image_invalidate_all()</code></a>, but obviously only
affects a single region. </p>
<p>See also: <a class="link" href="libvips-VipsImage.html#vips-image-invalidate-all" title="vips_image_invalidate_all ()"><code class="function">vips_image_invalidate_all()</code></a>, <a class="link" href="libvips-VipsRegion.html#vips-region-prepare" title="vips_region_prepare ()"><code class="function">vips_region_prepare()</code></a>.</p>
<div class="refsect3">
<a name="id-1.3.9.7.16.7"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>reg</p></td>
<td class="parameter_description"><p>region to invalidate</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="vips-region-dump-all"></a><h3>vips_region_dump_all ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
vips_region_dump_all (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="VIPS-REGION-LSKIP:CAPS"></a><h3>VIPS_REGION_LSKIP()</h3>
<pre class="programlisting">#define VIPS_REGION_LSKIP( R )</pre>
<div class="refsect3">
<a name="id-1.3.9.7.18.4"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>R</p></td>
<td class="parameter_description"><p>a <span class="type">VipsRegion</span></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.9.7.18.5"></a><h4>Returns</h4>
<p> The number of bytes to add to move down a scanline.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="VIPS-REGION-N-ELEMENTS:CAPS"></a><h3>VIPS_REGION_N_ELEMENTS()</h3>
<pre class="programlisting">#define VIPS_REGION_N_ELEMENTS( R )</pre>
<div class="refsect3">
<a name="id-1.3.9.7.19.4"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>R</p></td>
<td class="parameter_description"><p>a <span class="type">VipsRegion</span></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.9.7.19.5"></a><h4>Returns</h4>
<p> The number of band elements across a region.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="VIPS-REGION-SIZEOF-LINE:CAPS"></a><h3>VIPS_REGION_SIZEOF_LINE()</h3>
<pre class="programlisting">#define VIPS_REGION_SIZEOF_LINE( R )</pre>
<div class="refsect3">
<a name="id-1.3.9.7.20.4"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>R</p></td>
<td class="parameter_description"><p>a <span class="type">VipsRegion</span></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.9.7.20.5"></a><h4>Returns</h4>
<p> The number of bytes across a region.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="VIPS-REGION-ADDR:CAPS"></a><h3>VIPS_REGION_ADDR()</h3>
<pre class="programlisting">#define VIPS_REGION_ADDR( R, X, Y )</pre>
<p>This macro returns a pointer to a pixel in a region. The (<em class="parameter"><code>X</code></em>
, <em class="parameter"><code>Y</code></em>
)
coordinates need to be within the <a class="link" href="libvips-rect.html#VipsRect" title="VipsRect"><span class="type">VipsRect</span></a> (<em class="parameter"><code>R->valid</code></em>
).</p>
<p>If DEBUG is defined, you get a version that checks bounds for you.</p>
<p>See also: <a class="link" href="libvips-VipsRegion.html#vips-region-prepare" title="vips_region_prepare ()"><code class="function">vips_region_prepare()</code></a>.</p>
<div class="refsect3">
<a name="id-1.3.9.7.21.7"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>R</p></td>
<td class="parameter_description"><p>a <span class="type">VipsRegion</span></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>X</p></td>
<td class="parameter_description"><p>x coordinate</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>Y</p></td>
<td class="parameter_description"><p>y coordinate</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.9.7.21.8"></a><h4>Returns</h4>
<p> The address of pixel (<em class="parameter"><code>X</code></em>
,<em class="parameter"><code>Y</code></em>
) in <em class="parameter"><code>R</code></em>
.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="VIPS-REGION-ADDR-TOPLEFT:CAPS"></a><h3>VIPS_REGION_ADDR_TOPLEFT()</h3>
<pre class="programlisting">#define VIPS_REGION_ADDR_TOPLEFT( R ) ((R)->data)
</pre>
<p>This macro returns a pointer to the top-left pixel in the <span class="type">VipsRegion</span>, that
is, the pixel at (<em class="parameter"><code>R->valid.left</code></em>
, <em class="parameter"><code>R->valid.top</code></em>
).</p>
<p>See also: <a class="link" href="libvips-VipsRegion.html#vips-region-prepare" title="vips_region_prepare ()"><code class="function">vips_region_prepare()</code></a>.</p>
<div class="refsect3">
<a name="id-1.3.9.7.22.6"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>R</p></td>
<td class="parameter_description"><p>a <span class="type">VipsRegion</span></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.9.7.22.7"></a><h4>Returns</h4>
<p> The address of the top-left pixel in the region.</p>
</div>
</div>
</div>
<div class="refsect1">
<a name="libvips-VipsRegion.other_details"></a><h2>Types and Values</h2>
</div>
<div class="refsect1">
<a name="libvips-VipsRegion.see-also"></a><h2>See Also</h2>
image,
<a class="link" href="libvips-generate.html" title="generate">generate</a>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.24</div>
</body>
</html>
|