Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > c109337651527e96d7bb9adc83c5b18a > files > 65

libvips-devel-7.18.2-1mdv2010.0.i586.rpm

<!-- manual page source format generated by PolyglotMan v3.2, -->
<!-- available at http://polyglotman.sourceforge.net/ -->

<html>
<head>
<title>MACROS(3) manual page</title>
</head>
<body bgcolor='white'>
<a href='#toc'>Table of Contents</a><p>

<h2><a name='sect0' href='#toc0'>Name</a></h2>
IM_REGION_ADDR,  IM_REGION_LSKIP, IM_REGION_N_ELEMENTS, IM_REGION_SIZEOF_LINE
-  macros for regions  
<h2><a name='sect1' href='#toc1'>Synopsis</a></h2>
<b>#include &lt;vips/vips.h&gt;</b> 
<p> int IM_REGION_LSKIP(
reg )  <br>
REGION *reg; 
<p> int IM_REGION_N_ELEMENTS( reg )  <br>
REGION *reg; 
<p> int IM_REGION_SIZEOF_LINE( reg )  <br>
REGION *reg; 
<p> char *IM_REGION_ADDR( reg, x, y )  <br>
REGION *reg; <br>
int x, y; 
<p> 
<h2><a name='sect2' href='#toc2'>Description</a></h2>
These macros help to simplify address arithmetic
for regions.  
<p> <a href='IM_REGION_LSKIP.3.html'>IM_REGION_LSKIP(3)</a>
 returns the number of *bytes* you should
add to move down a scan line.  Remember that if your pointer has been cast
to the type of the image pels, this will not be the correct amount to add!
The value lskip returns can be changed by a call to <a href='im_prepare.3.html'>im_prepare(3)</a>
. 
<p> <a href='IM_REGION_N_ELEMENTS.3.html'>IM_REGION_N_ELEMENTS(3)</a>

returns the number of band elements across the region. 
<p> <a href='IM_REGION_SIZEOF_LINE.3.html'>IM_REGION_SIZEOF_LINE(3)</a>

returns sizeof( horizontal line across region ). 
<p> <a href='IM_REGION_ADDR.3.html'>IM_REGION_ADDR(3)</a>
 returns
a pointer to the pixel at position (x,y) in the image on which reg has
been defined. The point (x,y) should lie within the valid area for this
region. 
<p> If the macro DEBUG has been defined, then <a href='IM_REGION_ADDR.3.html'>IM_REGION_ADDR(3)</a>
 will
also perform bounds checking. If you ask for the address of a pel outside
the rect reg-&gt;valid, then <a href='IM_REGION_ADDR.3.html'>IM_REGION_ADDR(3)</a>
 will print an error message of
the form: 
<p>     IM_REGION_ADDR: point out of bounds, file "test.c", line
18<br>
     (point x=50, y=0 <br>
      should have been within Rect left=0, top=0, width=50, height=50)<br>
 
<p> and call <a href='abort.3.html'>abort(3)</a>
. 
<p> DEBUG needs to be defined *before* region.h is included.
Either define DEBUG with -D in your Makefile, or have a #define DEBUG right
at the top of your file. 
<p> 
<h2><a name='sect3' href='#toc3'>Copyright</a></h2>
National Gallery, 1993 
<h2><a name='sect4' href='#toc4'>See Also</a></h2>
<a href='IM_IMAGE_ADDR.3.html'>IM_IMAGE_ADDR(3)</a>
,
<a href='im_malloc.3.html'>im_malloc(3)</a>
, <a href='im_open_local.3.html'>im_open_local(3)</a>
.  
<h2><a name='sect5' href='#toc5'>Author</a></h2>
J. Cupitt - 23/7/93  <p>

<hr><p>
<a name='toc'><b>Table of Contents</b></a><p>
<ul>
<li><a name='toc0' href='#sect0'>Name</a></li>
<li><a name='toc1' href='#sect1'>Synopsis</a></li>
<li><a name='toc2' href='#sect2'>Description</a></li>
<li><a name='toc3' href='#sect3'>Copyright</a></li>
<li><a name='toc4' href='#sect4'>See Also</a></li>
<li><a name='toc5' href='#sect5'>Author</a></li>
</ul>
</body>
</html>