~ubuntu-branches/ubuntu/utopic/vips/utopic-proposed

« back to all changes in this revision

Viewing changes to doc/reference/html/libvips-inplace.html

  • Committer: Package Import Robot
  • Author(s): Jay Berkenbilt
  • Date: 2014-06-21 16:35:51 UTC
  • mfrom: (1.2.23)
  • Revision ID: package-import@ubuntu.com-20140621163551-l7mq3sjc5pkf94eu
Tags: 7.38.6-1
* New upstream version.
* Remove no-longer-needed dependency on gcc 4.7 for armhf. (Closes:
  #748006)
* Upstream version includes new German transltion. (Closes: #743613)

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
<html>
3
3
<head>
4
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
 
<title>inplace</title>
 
5
<title>VIPS Reference Manual: inplace</title>
6
6
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
7
7
<link rel="home" href="index.html" title="VIPS Reference Manual">
8
8
<link rel="up" href="ch02.html" title="VIPS operation API by section">
9
9
<link rel="prev" href="libvips-histogram.html" title="histogram">
10
10
<link rel="next" href="VipsInterpolate.html" title="VipsInterpolate">
11
 
<meta name="generator" content="GTK-Doc V1.19 (XML mode)">
 
11
<meta name="generator" content="GTK-Doc V1.20 (XML mode)">
12
12
<link rel="stylesheet" href="style.css" type="text/css">
13
13
</head>
14
14
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15
 
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
16
 
<tr valign="middle">
17
 
<td><a accesskey="p" href="libvips-histogram.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18
 
<td><a accesskey="u" href="ch02.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
19
 
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
20
 
<th width="100%" align="center">VIPS Reference Manual</th>
21
 
<td><a accesskey="n" href="VipsInterpolate.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
22
 
</tr>
23
 
<tr><td colspan="5" class="shortcuts">
24
 
<a href="#libvips-inplace.synopsis" class="shortcut">Top</a>
25
 
                   | 
26
 
                  <a href="#libvips-inplace.description" class="shortcut">Description</a>
27
 
</td></tr>
28
 
</table>
 
15
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="10"><tr valign="middle">
 
16
<td width="100%" align="left" class="shortcuts">
 
17
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span> 
 
18
                  <a href="#libvips-inplace.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span> 
 
19
                  <a href="#libvips-inplace.object-hierarchy" class="shortcut">Object Hierarchy</a></span>
 
20
</td>
 
21
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
 
22
<td><a accesskey="u" href="ch02.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
 
23
<td><a accesskey="p" href="libvips-histogram.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
 
24
<td><a accesskey="n" href="VipsInterpolate.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
 
25
</tr></table>
29
26
<div class="refentry">
30
27
<a name="libvips-inplace"></a><div class="titlepage"></div>
31
28
<div class="refnamediv"><table width="100%"><tr>
34
31
<p>inplace — in-place paintbox operations: flood, paste, line,
35
32
circle</p>
36
33
</td>
37
 
<td valign="top" align="right"></td>
 
34
<td class="gallery_image" valign="top" align="right"></td>
38
35
</tr></table></div>
39
36
<div class="refsect1">
40
37
<a name="libvips-inplace.stability-level"></a><h2>Stability Level</h2>
41
38
Stable, unless otherwise indicated
42
39
</div>
43
 
<div class="refsynopsisdiv">
44
 
<a name="libvips-inplace.synopsis"></a><h2>Synopsis</h2>
45
 
<pre class="synopsis">
46
 
#include &lt;vips/vips.h&gt;
47
 
 
48
 
<span class="returnvalue">int</span>                 <a class="link" href="libvips-inplace.html#im-draw-rect" title="im_draw_rect ()">im_draw_rect</a>                        (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *image</code></em>,
49
 
                                                         <em class="parameter"><code><span class="type">int</span> left</code></em>,
50
 
                                                         <em class="parameter"><code><span class="type">int</span> top</code></em>,
51
 
                                                         <em class="parameter"><code><span class="type">int</span> width</code></em>,
52
 
                                                         <em class="parameter"><code><span class="type">int</span> height</code></em>,
53
 
                                                         <em class="parameter"><code><span class="type">int</span> fill</code></em>,
54
 
                                                         <em class="parameter"><code><span class="type">VipsPel</span> *ink</code></em>);
55
 
<span class="returnvalue">int</span>                 <a class="link" href="libvips-inplace.html#im-draw-circle" title="im_draw_circle ()">im_draw_circle</a>                      (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *image</code></em>,
56
 
                                                         <em class="parameter"><code><span class="type">int</span> x</code></em>,
57
 
                                                         <em class="parameter"><code><span class="type">int</span> y</code></em>,
58
 
                                                         <em class="parameter"><code><span class="type">int</span> radius</code></em>,
59
 
                                                         <em class="parameter"><code><span class="type">gboolean</span> fill</code></em>,
60
 
                                                         <em class="parameter"><code><span class="type">VipsPel</span> *ink</code></em>);
61
 
<span class="returnvalue">int</span>                 <a class="link" href="libvips-inplace.html#im-draw-image" title="im_draw_image ()">im_draw_image</a>                       (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *image</code></em>,
62
 
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *sub</code></em>,
63
 
                                                         <em class="parameter"><code><span class="type">int</span> x</code></em>,
64
 
                                                         <em class="parameter"><code><span class="type">int</span> y</code></em>);
65
 
<span class="returnvalue">int</span>                 (<a class="link" href="libvips-inplace.html#VipsPlotFn" title="VipsPlotFn ()">*VipsPlotFn</a>)                       (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *image</code></em>,
66
 
                                                         <em class="parameter"><code><span class="type">int</span> x</code></em>,
67
 
                                                         <em class="parameter"><code><span class="type">int</span> y</code></em>,
68
 
                                                         <em class="parameter"><code><span class="type">void</span> *a</code></em>,
69
 
                                                         <em class="parameter"><code><span class="type">void</span> *b</code></em>,
70
 
                                                         <em class="parameter"><code><span class="type">void</span> *c</code></em>);
71
 
<span class="returnvalue">int</span>                 <a class="link" href="libvips-inplace.html#im-draw-line-user" title="im_draw_line_user ()">im_draw_line_user</a>                   (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *image</code></em>,
72
 
                                                         <em class="parameter"><code><span class="type">int</span> x1</code></em>,
73
 
                                                         <em class="parameter"><code><span class="type">int</span> y1</code></em>,
74
 
                                                         <em class="parameter"><code><span class="type">int</span> x2</code></em>,
75
 
                                                         <em class="parameter"><code><span class="type">int</span> y2</code></em>,
76
 
                                                         <em class="parameter"><code><a class="link" href="libvips-inplace.html#VipsPlotFn" title="VipsPlotFn ()"><span class="type">VipsPlotFn</span></a> plot</code></em>,
77
 
                                                         <em class="parameter"><code><span class="type">void</span> *a</code></em>,
78
 
                                                         <em class="parameter"><code><span class="type">void</span> *b</code></em>,
79
 
                                                         <em class="parameter"><code><span class="type">void</span> *c</code></em>);
80
 
<span class="returnvalue">int</span>                 <a class="link" href="libvips-inplace.html#im-draw-line" title="im_draw_line ()">im_draw_line</a>                        (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *image</code></em>,
81
 
                                                         <em class="parameter"><code><span class="type">int</span> x1</code></em>,
82
 
                                                         <em class="parameter"><code><span class="type">int</span> y1</code></em>,
83
 
                                                         <em class="parameter"><code><span class="type">int</span> x2</code></em>,
84
 
                                                         <em class="parameter"><code><span class="type">int</span> y2</code></em>,
85
 
                                                         <em class="parameter"><code><span class="type">VipsPel</span> *ink</code></em>);
86
 
<span class="returnvalue">int</span>                 <a class="link" href="libvips-inplace.html#im-lineset" title="im_lineset ()">im_lineset</a>                          (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
87
 
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>,
88
 
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *mask</code></em>,
89
 
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *ink</code></em>,
90
 
                                                         <em class="parameter"><code><span class="type">int</span> n</code></em>,
91
 
                                                         <em class="parameter"><code><span class="type">int</span> *x1v</code></em>,
92
 
                                                         <em class="parameter"><code><span class="type">int</span> *y1v</code></em>,
93
 
                                                         <em class="parameter"><code><span class="type">int</span> *x2v</code></em>,
94
 
                                                         <em class="parameter"><code><span class="type">int</span> *y2v</code></em>);
95
 
<span class="returnvalue">int</span>                 <a class="link" href="libvips-inplace.html#im-draw-flood" title="im_draw_flood ()">im_draw_flood</a>                       (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *image</code></em>,
96
 
                                                         <em class="parameter"><code><span class="type">int</span> x</code></em>,
97
 
                                                         <em class="parameter"><code><span class="type">int</span> y</code></em>,
98
 
                                                         <em class="parameter"><code><span class="type">VipsPel</span> *ink</code></em>,
99
 
                                                         <em class="parameter"><code><a class="link" href="libvips-rect.html#VipsRect" title="VipsRect"><span class="type">VipsRect</span></a> *dout</code></em>);
100
 
<span class="returnvalue">int</span>                 <a class="link" href="libvips-inplace.html#im-draw-flood-blob" title="im_draw_flood_blob ()">im_draw_flood_blob</a>                  (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *image</code></em>,
101
 
                                                         <em class="parameter"><code><span class="type">int</span> x</code></em>,
102
 
                                                         <em class="parameter"><code><span class="type">int</span> y</code></em>,
103
 
                                                         <em class="parameter"><code><span class="type">VipsPel</span> *ink</code></em>,
104
 
                                                         <em class="parameter"><code><a class="link" href="libvips-rect.html#VipsRect" title="VipsRect"><span class="type">VipsRect</span></a> *dout</code></em>);
105
 
<span class="returnvalue">int</span>                 <a class="link" href="libvips-inplace.html#im-draw-flood-other" title="im_draw_flood_other ()">im_draw_flood_other</a>                 (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *image</code></em>,
106
 
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *test</code></em>,
107
 
                                                         <em class="parameter"><code><span class="type">int</span> x</code></em>,
108
 
                                                         <em class="parameter"><code><span class="type">int</span> y</code></em>,
109
 
                                                         <em class="parameter"><code><span class="type">int</span> serial</code></em>,
110
 
                                                         <em class="parameter"><code><a class="link" href="libvips-rect.html#VipsRect" title="VipsRect"><span class="type">VipsRect</span></a> *dout</code></em>);
111
 
<span class="returnvalue">int</span>                 <a class="link" href="libvips-inplace.html#im-draw-mask" title="im_draw_mask ()">im_draw_mask</a>                        (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *image</code></em>,
112
 
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *mask_im</code></em>,
113
 
                                                         <em class="parameter"><code><span class="type">int</span> x</code></em>,
114
 
                                                         <em class="parameter"><code><span class="type">int</span> y</code></em>,
115
 
                                                         <em class="parameter"><code><span class="type">VipsPel</span> *ink</code></em>);
116
 
<span class="returnvalue">int</span>                 <a class="link" href="libvips-inplace.html#im-draw-point" title="im_draw_point ()">im_draw_point</a>                       (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *image</code></em>,
117
 
                                                         <em class="parameter"><code><span class="type">int</span> x</code></em>,
118
 
                                                         <em class="parameter"><code><span class="type">int</span> y</code></em>,
119
 
                                                         <em class="parameter"><code><span class="type">VipsPel</span> *ink</code></em>);
120
 
<span class="returnvalue">int</span>                 <a class="link" href="libvips-inplace.html#im-read-point" title="im_read_point ()">im_read_point</a>                       (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *image</code></em>,
121
 
                                                         <em class="parameter"><code><span class="type">int</span> x</code></em>,
122
 
                                                         <em class="parameter"><code><span class="type">int</span> y</code></em>,
123
 
                                                         <em class="parameter"><code><span class="type">VipsPel</span> *ink</code></em>);
124
 
<span class="returnvalue">int</span>                 <a class="link" href="libvips-inplace.html#im-draw-smudge" title="im_draw_smudge ()">im_draw_smudge</a>                      (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *image</code></em>,
125
 
                                                         <em class="parameter"><code><span class="type">int</span> left</code></em>,
126
 
                                                         <em class="parameter"><code><span class="type">int</span> top</code></em>,
127
 
                                                         <em class="parameter"><code><span class="type">int</span> width</code></em>,
128
 
                                                         <em class="parameter"><code><span class="type">int</span> height</code></em>);
 
40
<div class="refsect1">
 
41
<a name="libvips-inplace.functions"></a><h2>Functions</h2>
 
42
<div class="informaltable"><table width="100%" border="0">
 
43
<colgroup>
 
44
<col width="150px" class="functions_return">
 
45
<col class="functions_name">
 
46
</colgroup>
 
47
<tbody>
 
48
<tr>
 
49
<td class="function_type">
 
50
<span class="returnvalue">int</span>
 
51
</td>
 
52
<td class="function_name">
 
53
<a class="link" href="libvips-inplace.html#im-draw-rect" title="im_draw_rect ()">im_draw_rect</a> <span class="c_punctuation">()</span>
 
54
</td>
 
55
</tr>
 
56
<tr>
 
57
<td class="function_type">
 
58
<span class="returnvalue">int</span>
 
59
</td>
 
60
<td class="function_name">
 
61
<a class="link" href="libvips-inplace.html#im-draw-circle" title="im_draw_circle ()">im_draw_circle</a> <span class="c_punctuation">()</span>
 
62
</td>
 
63
</tr>
 
64
<tr>
 
65
<td class="function_type">
 
66
<span class="returnvalue">int</span>
 
67
</td>
 
68
<td class="function_name">
 
69
<a class="link" href="libvips-inplace.html#im-draw-image" title="im_draw_image ()">im_draw_image</a> <span class="c_punctuation">()</span>
 
70
</td>
 
71
</tr>
 
72
<tr>
 
73
<td class="function_type">
 
74
<span class="returnvalue">int</span>
 
75
</td>
 
76
<td class="function_name">
 
77
<span class="c_punctuation">(</span><a class="link" href="libvips-inplace.html#VipsPlotFn" title="VipsPlotFn ()">*VipsPlotFn</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
 
78
</td>
 
79
</tr>
 
80
<tr>
 
81
<td class="function_type">
 
82
<span class="returnvalue">int</span>
 
83
</td>
 
84
<td class="function_name">
 
85
<a class="link" href="libvips-inplace.html#im-draw-line-user" title="im_draw_line_user ()">im_draw_line_user</a> <span class="c_punctuation">()</span>
 
86
</td>
 
87
</tr>
 
88
<tr>
 
89
<td class="function_type">
 
90
<span class="returnvalue">int</span>
 
91
</td>
 
92
<td class="function_name">
 
93
<a class="link" href="libvips-inplace.html#im-draw-line" title="im_draw_line ()">im_draw_line</a> <span class="c_punctuation">()</span>
 
94
</td>
 
95
</tr>
 
96
<tr>
 
97
<td class="function_type">
 
98
<span class="returnvalue">int</span>
 
99
</td>
 
100
<td class="function_name">
 
101
<a class="link" href="libvips-inplace.html#im-lineset" title="im_lineset ()">im_lineset</a> <span class="c_punctuation">()</span>
 
102
</td>
 
103
</tr>
 
104
<tr>
 
105
<td class="function_type">
 
106
<span class="returnvalue">int</span>
 
107
</td>
 
108
<td class="function_name">
 
109
<a class="link" href="libvips-inplace.html#im-draw-flood" title="im_draw_flood ()">im_draw_flood</a> <span class="c_punctuation">()</span>
 
110
</td>
 
111
</tr>
 
112
<tr>
 
113
<td class="function_type">
 
114
<span class="returnvalue">int</span>
 
115
</td>
 
116
<td class="function_name">
 
117
<a class="link" href="libvips-inplace.html#im-draw-flood-blob" title="im_draw_flood_blob ()">im_draw_flood_blob</a> <span class="c_punctuation">()</span>
 
118
</td>
 
119
</tr>
 
120
<tr>
 
121
<td class="function_type">
 
122
<span class="returnvalue">int</span>
 
123
</td>
 
124
<td class="function_name">
 
125
<a class="link" href="libvips-inplace.html#im-draw-flood-other" title="im_draw_flood_other ()">im_draw_flood_other</a> <span class="c_punctuation">()</span>
 
126
</td>
 
127
</tr>
 
128
<tr>
 
129
<td class="function_type">
 
130
<span class="returnvalue">int</span>
 
131
</td>
 
132
<td class="function_name">
 
133
<a class="link" href="libvips-inplace.html#im-draw-mask" title="im_draw_mask ()">im_draw_mask</a> <span class="c_punctuation">()</span>
 
134
</td>
 
135
</tr>
 
136
<tr>
 
137
<td class="function_type">
 
138
<span class="returnvalue">int</span>
 
139
</td>
 
140
<td class="function_name">
 
141
<a class="link" href="libvips-inplace.html#im-draw-point" title="im_draw_point ()">im_draw_point</a> <span class="c_punctuation">()</span>
 
142
</td>
 
143
</tr>
 
144
<tr>
 
145
<td class="function_type">
 
146
<span class="returnvalue">int</span>
 
147
</td>
 
148
<td class="function_name">
 
149
<a class="link" href="libvips-inplace.html#im-read-point" title="im_read_point ()">im_read_point</a> <span class="c_punctuation">()</span>
 
150
</td>
 
151
</tr>
 
152
<tr>
 
153
<td class="function_type">
 
154
<span class="returnvalue">int</span>
 
155
</td>
 
156
<td class="function_name">
 
157
<a class="link" href="libvips-inplace.html#im-draw-smudge" title="im_draw_smudge ()">im_draw_smudge</a> <span class="c_punctuation">()</span>
 
158
</td>
 
159
</tr>
 
160
</tbody>
 
161
</table></div>
 
162
</div>
 
163
<div class="refsect1">
 
164
<a name="libvips-inplace.object-hierarchy"></a><h2>Object Hierarchy</h2>
 
165
<pre class="screen">
 
166
</pre>
 
167
</div>
 
168
<div class="refsect1">
 
169
<a name="libvips-inplace.includes"></a><h2>Includes</h2>
 
170
<pre class="synopsis">#include &lt;vips/vips.h&gt;
129
171
</pre>
130
172
</div>
131
173
<div class="refsect1">
132
174
<a name="libvips-inplace.description"></a><h2>Description</h2>
133
 
<p>
134
 
These operations directly modify the image. They do not thread, on 32-bit
 
175
<p>These operations directly modify the image. They do not thread, on 32-bit
135
176
machines they will be limited to 2GB images, and a little care needs to be
136
 
taken if you use them as part of an image pipeline. 
137
 
</p>
138
 
<p>
139
 
They are mostly supposed to be useful 
140
 
for paintbox-style programs.
141
 
</p>
 
177
taken if you use them as part of an image pipeline. </p>
 
178
<p>They are mostly supposed to be useful 
 
179
for paintbox-style programs.</p>
142
180
</div>
143
181
<div class="refsect1">
144
 
<a name="libvips-inplace.details"></a><h2>Details</h2>
145
 
<div class="refsect2">
146
 
<a name="im-draw-rect"></a><h3>im_draw_rect ()</h3>
147
 
<pre class="programlisting"><span class="returnvalue">int</span>                 im_draw_rect                        (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *image</code></em>,
148
 
                                                         <em class="parameter"><code><span class="type">int</span> left</code></em>,
149
 
                                                         <em class="parameter"><code><span class="type">int</span> top</code></em>,
150
 
                                                         <em class="parameter"><code><span class="type">int</span> width</code></em>,
151
 
                                                         <em class="parameter"><code><span class="type">int</span> height</code></em>,
152
 
                                                         <em class="parameter"><code><span class="type">int</span> fill</code></em>,
153
 
                                                         <em class="parameter"><code><span class="type">VipsPel</span> *ink</code></em>);</pre>
154
 
<p>
155
 
Paint pixels within <em class="parameter"><code>left</code></em>, <em class="parameter"><code>top</code></em>, <em class="parameter"><code>width</code></em>, <em class="parameter"><code>height</code></em> in <em class="parameter"><code>image</code></em> with <em class="parameter"><code>ink</code></em>. If
156
 
<em class="parameter"><code>fill</code></em> is zero, just paint a 1-pixel-wide outline.
157
 
</p>
158
 
<p>
159
 
See also: <a class="link" href="libvips-inplace.html#im-draw-circle" title="im_draw_circle ()"><code class="function">im_draw_circle()</code></a>.
160
 
</p>
161
 
<div class="variablelist"><table border="0" class="variablelist">
162
 
<colgroup>
163
 
<col align="left" valign="top">
164
 
<col>
165
 
</colgroup>
166
 
<tbody>
167
 
<tr>
168
 
<td><p><span class="term"><em class="parameter"><code>image</code></em> :</span></p></td>
169
 
<td>image to draw on</td>
170
 
</tr>
171
 
<tr>
172
 
<td><p><span class="term"><em class="parameter"><code>left</code></em> :</span></p></td>
173
 
<td>area to paint</td>
174
 
</tr>
175
 
<tr>
176
 
<td><p><span class="term"><em class="parameter"><code>top</code></em> :</span></p></td>
177
 
<td>area to paint</td>
178
 
</tr>
179
 
<tr>
180
 
<td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
181
 
<td>area to paint</td>
182
 
</tr>
183
 
<tr>
184
 
<td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td>
185
 
<td>area to paint</td>
186
 
</tr>
187
 
<tr>
188
 
<td><p><span class="term"><em class="parameter"><code>fill</code></em> :</span></p></td>
189
 
<td>fill the rect</td>
190
 
</tr>
191
 
<tr>
192
 
<td><p><span class="term"><em class="parameter"><code>ink</code></em> :</span></p></td>
193
 
<td>paint with this colour</td>
194
 
</tr>
195
 
<tr>
196
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
197
 
<td>0 on success, or -1 on error.</td>
198
 
</tr>
199
 
</tbody>
200
 
</table></div>
201
 
</div>
202
 
<hr>
203
 
<div class="refsect2">
204
 
<a name="im-draw-circle"></a><h3>im_draw_circle ()</h3>
205
 
<pre class="programlisting"><span class="returnvalue">int</span>                 im_draw_circle                      (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *image</code></em>,
206
 
                                                         <em class="parameter"><code><span class="type">int</span> x</code></em>,
207
 
                                                         <em class="parameter"><code><span class="type">int</span> y</code></em>,
208
 
                                                         <em class="parameter"><code><span class="type">int</span> radius</code></em>,
209
 
                                                         <em class="parameter"><code><span class="type">gboolean</span> fill</code></em>,
210
 
                                                         <em class="parameter"><code><span class="type">VipsPel</span> *ink</code></em>);</pre>
211
 
<p>
212
 
Draws a circle on <em class="parameter"><code>image</code></em>. If <em class="parameter"><code>fill</code></em> is <code class="literal">TRUE</code> then the circle is filled,
213
 
otherwise a 1-pixel-wide perimeter is drawn.
214
 
</p>
215
 
<p>
216
 
<em class="parameter"><code>ink</code></em> is an array of bytes containing a valid pixel for the image's format.
217
 
It must have at least IM_IMAGE_SIZEOF_PEL( <em class="parameter"><code>image</code></em> ) bytes.
218
 
</p>
219
 
<p>
220
 
See also: <a class="link" href="libvips-inplace.html#im-draw-line" title="im_draw_line ()"><code class="function">im_draw_line()</code></a>.
221
 
</p>
222
 
<div class="variablelist"><table border="0" class="variablelist">
223
 
<colgroup>
224
 
<col align="left" valign="top">
225
 
<col>
226
 
</colgroup>
227
 
<tbody>
228
 
<tr>
229
 
<td><p><span class="term"><em class="parameter"><code>image</code></em> :</span></p></td>
230
 
<td>image to draw on</td>
231
 
</tr>
232
 
<tr>
233
 
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
234
 
<td>centre of circle</td>
235
 
</tr>
236
 
<tr>
237
 
<td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
238
 
<td>centre of circle</td>
239
 
</tr>
240
 
<tr>
241
 
<td><p><span class="term"><em class="parameter"><code>radius</code></em> :</span></p></td>
242
 
<td>circle radius</td>
243
 
</tr>
244
 
<tr>
245
 
<td><p><span class="term"><em class="parameter"><code>fill</code></em> :</span></p></td>
246
 
<td>fill the circle</td>
247
 
</tr>
248
 
<tr>
249
 
<td><p><span class="term"><em class="parameter"><code>ink</code></em> :</span></p></td>
250
 
<td>value to draw</td>
251
 
</tr>
252
 
<tr>
253
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
254
 
<td>0 on success, or -1 on error.</td>
255
 
</tr>
256
 
</tbody>
257
 
</table></div>
258
 
</div>
259
 
<hr>
260
 
<div class="refsect2">
261
 
<a name="im-draw-image"></a><h3>im_draw_image ()</h3>
262
 
<pre class="programlisting"><span class="returnvalue">int</span>                 im_draw_image                       (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *image</code></em>,
263
 
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *sub</code></em>,
264
 
                                                         <em class="parameter"><code><span class="type">int</span> x</code></em>,
265
 
                                                         <em class="parameter"><code><span class="type">int</span> y</code></em>);</pre>
266
 
<p>
267
 
Draw <em class="parameter"><code>sub</code></em> on top of <em class="parameter"><code>image</code></em> at position <em class="parameter"><code>x</code></em>, <em class="parameter"><code>y</code></em>. The two images must have the 
 
182
<a name="libvips-inplace.functions_details"></a><h2>Functions</h2>
 
183
<div class="refsect2">
 
184
<a name="im-draw-rect"></a><h3>im_draw_rect ()</h3>
 
185
<pre class="programlisting"><span class="returnvalue">int</span>
 
186
im_draw_rect (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *image</code></em>,
 
187
              <em class="parameter"><code><span class="type">int</span> left</code></em>,
 
188
              <em class="parameter"><code><span class="type">int</span> top</code></em>,
 
189
              <em class="parameter"><code><span class="type">int</span> width</code></em>,
 
190
              <em class="parameter"><code><span class="type">int</span> height</code></em>,
 
191
              <em class="parameter"><code><span class="type">int</span> fill</code></em>,
 
192
              <em class="parameter"><code><span class="type">VipsPel</span> *ink</code></em>);</pre>
 
193
<p>Paint pixels within <em class="parameter"><code>left</code></em>
 
194
, <em class="parameter"><code>top</code></em>
 
195
, <em class="parameter"><code>width</code></em>
 
196
, <em class="parameter"><code>height</code></em>
 
197
 in <em class="parameter"><code>image</code></em>
 
198
 with <em class="parameter"><code>ink</code></em>
 
199
. If
 
200
<em class="parameter"><code>fill</code></em>
 
201
 is zero, just paint a 1-pixel-wide outline.</p>
 
202
<p>See also: <a class="link" href="libvips-inplace.html#im-draw-circle" title="im_draw_circle ()"><code class="function">im_draw_circle()</code></a>.</p>
 
203
<div class="refsect3">
 
204
<a name="id-1.3.9.8.2.6"></a><h4>Parameters</h4>
 
205
<div class="informaltable"><table width="100%" border="0">
 
206
<colgroup>
 
207
<col width="150px" class="parameters_name">
 
208
<col class="parameters_description">
 
209
<col width="200px" class="parameters_annotations">
 
210
</colgroup>
 
211
<tbody>
 
212
<tr>
 
213
<td class="parameter_name"><p>image</p></td>
 
214
<td class="parameter_description"><p>image to draw on</p></td>
 
215
<td class="parameter_annotations"> </td>
 
216
</tr>
 
217
<tr>
 
218
<td class="parameter_name"><p>left</p></td>
 
219
<td class="parameter_description"><p>area to paint</p></td>
 
220
<td class="parameter_annotations"> </td>
 
221
</tr>
 
222
<tr>
 
223
<td class="parameter_name"><p>top</p></td>
 
224
<td class="parameter_description"><p>area to paint</p></td>
 
225
<td class="parameter_annotations"> </td>
 
226
</tr>
 
227
<tr>
 
228
<td class="parameter_name"><p>width</p></td>
 
229
<td class="parameter_description"><p>area to paint</p></td>
 
230
<td class="parameter_annotations"> </td>
 
231
</tr>
 
232
<tr>
 
233
<td class="parameter_name"><p>height</p></td>
 
234
<td class="parameter_description"><p>area to paint</p></td>
 
235
<td class="parameter_annotations"> </td>
 
236
</tr>
 
237
<tr>
 
238
<td class="parameter_name"><p>fill</p></td>
 
239
<td class="parameter_description"><p>fill the rect</p></td>
 
240
<td class="parameter_annotations"> </td>
 
241
</tr>
 
242
<tr>
 
243
<td class="parameter_name"><p>ink</p></td>
 
244
<td class="parameter_description"><p>paint with this colour</p></td>
 
245
<td class="parameter_annotations"> </td>
 
246
</tr>
 
247
</tbody>
 
248
</table></div>
 
249
</div>
 
250
<div class="refsect3">
 
251
<a name="id-1.3.9.8.2.7"></a><h4>Returns</h4>
 
252
<p> 0 on success, or -1 on error.</p>
 
253
<p></p>
 
254
</div>
 
255
</div>
 
256
<hr>
 
257
<div class="refsect2">
 
258
<a name="im-draw-circle"></a><h3>im_draw_circle ()</h3>
 
259
<pre class="programlisting"><span class="returnvalue">int</span>
 
260
im_draw_circle (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *image</code></em>,
 
261
                <em class="parameter"><code><span class="type">int</span> x</code></em>,
 
262
                <em class="parameter"><code><span class="type">int</span> y</code></em>,
 
263
                <em class="parameter"><code><span class="type">int</span> radius</code></em>,
 
264
                <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> fill</code></em>,
 
265
                <em class="parameter"><code><span class="type">VipsPel</span> *ink</code></em>);</pre>
 
266
<p>Draws a circle on <em class="parameter"><code>image</code></em>
 
267
. If <em class="parameter"><code>fill</code></em>
 
268
 is <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> then the circle is filled,
 
269
otherwise a 1-pixel-wide perimeter is drawn.</p>
 
270
<p><em class="parameter"><code>ink</code></em>
 
271
 is an array of bytes containing a valid pixel for the image's format.
 
272
It must have at least IM_IMAGE_SIZEOF_PEL( <em class="parameter"><code>image</code></em>
 
273
 ) bytes.</p>
 
274
<p>See also: <a class="link" href="libvips-inplace.html#im-draw-line" title="im_draw_line ()"><code class="function">im_draw_line()</code></a>.</p>
 
275
<div class="refsect3">
 
276
<a name="id-1.3.9.8.3.7"></a><h4>Parameters</h4>
 
277
<div class="informaltable"><table width="100%" border="0">
 
278
<colgroup>
 
279
<col width="150px" class="parameters_name">
 
280
<col class="parameters_description">
 
281
<col width="200px" class="parameters_annotations">
 
282
</colgroup>
 
283
<tbody>
 
284
<tr>
 
285
<td class="parameter_name"><p>image</p></td>
 
286
<td class="parameter_description"><p>image to draw on</p></td>
 
287
<td class="parameter_annotations"> </td>
 
288
</tr>
 
289
<tr>
 
290
<td class="parameter_name"><p>x</p></td>
 
291
<td class="parameter_description"><p>centre of circle</p></td>
 
292
<td class="parameter_annotations"> </td>
 
293
</tr>
 
294
<tr>
 
295
<td class="parameter_name"><p>y</p></td>
 
296
<td class="parameter_description"><p>centre of circle</p></td>
 
297
<td class="parameter_annotations"> </td>
 
298
</tr>
 
299
<tr>
 
300
<td class="parameter_name"><p>radius</p></td>
 
301
<td class="parameter_description"><p>circle radius</p></td>
 
302
<td class="parameter_annotations"> </td>
 
303
</tr>
 
304
<tr>
 
305
<td class="parameter_name"><p>fill</p></td>
 
306
<td class="parameter_description"><p>fill the circle</p></td>
 
307
<td class="parameter_annotations"> </td>
 
308
</tr>
 
309
<tr>
 
310
<td class="parameter_name"><p>ink</p></td>
 
311
<td class="parameter_description"><p>value to draw</p></td>
 
312
<td class="parameter_annotations"> </td>
 
313
</tr>
 
314
</tbody>
 
315
</table></div>
 
316
</div>
 
317
<div class="refsect3">
 
318
<a name="id-1.3.9.8.3.8"></a><h4>Returns</h4>
 
319
<p> 0 on success, or -1 on error.</p>
 
320
<p></p>
 
321
</div>
 
322
</div>
 
323
<hr>
 
324
<div class="refsect2">
 
325
<a name="im-draw-image"></a><h3>im_draw_image ()</h3>
 
326
<pre class="programlisting"><span class="returnvalue">int</span>
 
327
im_draw_image (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *image</code></em>,
 
328
               <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *sub</code></em>,
 
329
               <em class="parameter"><code><span class="type">int</span> x</code></em>,
 
330
               <em class="parameter"><code><span class="type">int</span> y</code></em>);</pre>
 
331
<p>Draw <em class="parameter"><code>sub</code></em>
 
332
 on top of <em class="parameter"><code>image</code></em>
 
333
 at position <em class="parameter"><code>x</code></em>
 
334
, <em class="parameter"><code>y</code></em>
 
335
. The two images must have the 
268
336
same
269
 
Coding. If <em class="parameter"><code>sub</code></em> has 1 band, the bands will be duplicated to match the
270
 
number of bands in <em class="parameter"><code>image</code></em>. <em class="parameter"><code>sub</code></em> will be converted to <em class="parameter"><code>image</code></em>'s format, see
271
 
<code class="function">im_clip2fmt()</code>.
272
 
</p>
273
 
<p>
274
 
See also: <code class="function">im_insert()</code>.
275
 
</p>
276
 
<div class="variablelist"><table border="0" class="variablelist">
277
 
<colgroup>
278
 
<col align="left" valign="top">
279
 
<col>
280
 
</colgroup>
281
 
<tbody>
282
 
<tr>
283
 
<td><p><span class="term"><em class="parameter"><code>image</code></em> :</span></p></td>
284
 
<td>image to draw on</td>
285
 
</tr>
286
 
<tr>
287
 
<td><p><span class="term"><em class="parameter"><code>sub</code></em> :</span></p></td>
288
 
<td>image to draw</td>
289
 
</tr>
290
 
<tr>
291
 
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
292
 
<td>position to insert</td>
293
 
</tr>
294
 
<tr>
295
 
<td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
296
 
<td>position to insert</td>
297
 
</tr>
298
 
<tr>
299
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
300
 
<td>0 on success, or -1 on error.</td>
301
 
</tr>
302
 
</tbody>
303
 
</table></div>
304
 
</div>
305
 
<hr>
306
 
<div class="refsect2">
307
 
<a name="VipsPlotFn"></a><h3>VipsPlotFn ()</h3>
308
 
<pre class="programlisting"><span class="returnvalue">int</span>                 (*VipsPlotFn)                       (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *image</code></em>,
309
 
                                                         <em class="parameter"><code><span class="type">int</span> x</code></em>,
310
 
                                                         <em class="parameter"><code><span class="type">int</span> y</code></em>,
311
 
                                                         <em class="parameter"><code><span class="type">void</span> *a</code></em>,
312
 
                                                         <em class="parameter"><code><span class="type">void</span> *b</code></em>,
313
 
                                                         <em class="parameter"><code><span class="type">void</span> *c</code></em>);</pre>
314
 
<p>
315
 
A plot function, as used by <a class="link" href="libvips-inplace.html#im-draw-line-user" title="im_draw_line_user ()"><code class="function">im_draw_line_user()</code></a> to draw on an image.
316
 
</p>
317
 
<div class="variablelist"><table border="0" class="variablelist">
318
 
<colgroup>
319
 
<col align="left" valign="top">
320
 
<col>
321
 
</colgroup>
322
 
<tbody>
323
 
<tr>
324
 
<td><p><span class="term"><em class="parameter"><code>image</code></em> :</span></p></td>
325
 
<td>image to draw on</td>
326
 
</tr>
327
 
<tr>
328
 
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
329
 
<td>position to draw at</td>
330
 
</tr>
331
 
<tr>
332
 
<td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
333
 
<td>position to draw at</td>
334
 
</tr>
335
 
<tr>
336
 
<td><p><span class="term"><em class="parameter"><code>a</code></em> :</span></p></td>
337
 
<td>user data</td>
338
 
</tr>
339
 
<tr>
340
 
<td><p><span class="term"><em class="parameter"><code>b</code></em> :</span></p></td>
341
 
<td>user data</td>
342
 
</tr>
343
 
<tr>
344
 
<td><p><span class="term"><em class="parameter"><code>c</code></em> :</span></p></td>
345
 
<td>user data</td>
346
 
</tr>
347
 
</tbody>
348
 
</table></div>
349
 
</div>
350
 
<hr>
351
 
<div class="refsect2">
352
 
<a name="im-draw-line-user"></a><h3>im_draw_line_user ()</h3>
353
 
<pre class="programlisting"><span class="returnvalue">int</span>                 im_draw_line_user                   (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *image</code></em>,
354
 
                                                         <em class="parameter"><code><span class="type">int</span> x1</code></em>,
355
 
                                                         <em class="parameter"><code><span class="type">int</span> y1</code></em>,
356
 
                                                         <em class="parameter"><code><span class="type">int</span> x2</code></em>,
357
 
                                                         <em class="parameter"><code><span class="type">int</span> y2</code></em>,
358
 
                                                         <em class="parameter"><code><a class="link" href="libvips-inplace.html#VipsPlotFn" title="VipsPlotFn ()"><span class="type">VipsPlotFn</span></a> plot</code></em>,
359
 
                                                         <em class="parameter"><code><span class="type">void</span> *a</code></em>,
360
 
                                                         <em class="parameter"><code><span class="type">void</span> *b</code></em>,
361
 
                                                         <em class="parameter"><code><span class="type">void</span> *c</code></em>);</pre>
362
 
<p>
363
 
Calls <em class="parameter"><code>plot</code></em> for every point on the line connecting <em class="parameter"><code>x1</code></em>, <em class="parameter"><code>y1</code></em> and <em class="parameter"><code>x2</code></em>, <em class="parameter"><code>y2</code></em>.
364
 
If you pass <a class="link" href="libvips-inplace.html#im-draw-mask" title="im_draw_mask ()"><code class="function">im_draw_mask()</code></a> as the plot operation, you can draw wide lines
365
 
or lines with various brushes.
366
 
</p>
367
 
<p>
368
 
See also: <a class="link" href="libvips-inplace.html#im-draw-mask" title="im_draw_mask ()"><code class="function">im_draw_mask()</code></a>, <a class="link" href="libvips-inplace.html#im-draw-line" title="im_draw_line ()"><code class="function">im_draw_line()</code></a>, <a class="link" href="libvips-inplace.html#im-draw-circle" title="im_draw_circle ()"><code class="function">im_draw_circle()</code></a>.
369
 
</p>
370
 
<div class="variablelist"><table border="0" class="variablelist">
371
 
<colgroup>
372
 
<col align="left" valign="top">
373
 
<col>
374
 
</colgroup>
375
 
<tbody>
376
 
<tr>
377
 
<td><p><span class="term"><em class="parameter"><code>image</code></em> :</span></p></td>
378
 
<td>image to draw on</td>
379
 
</tr>
380
 
<tr>
381
 
<td><p><span class="term"><em class="parameter"><code>x1</code></em> :</span></p></td>
382
 
<td>start point</td>
383
 
</tr>
384
 
<tr>
385
 
<td><p><span class="term"><em class="parameter"><code>y1</code></em> :</span></p></td>
386
 
<td>start point</td>
387
 
</tr>
388
 
<tr>
389
 
<td><p><span class="term"><em class="parameter"><code>x2</code></em> :</span></p></td>
390
 
<td>end point</td>
391
 
</tr>
392
 
<tr>
393
 
<td><p><span class="term"><em class="parameter"><code>y2</code></em> :</span></p></td>
394
 
<td>end point</td>
395
 
</tr>
396
 
<tr>
397
 
<td><p><span class="term"><em class="parameter"><code>plot</code></em> :</span></p></td>
398
 
<td>draw operation</td>
399
 
</tr>
400
 
<tr>
401
 
<td><p><span class="term"><em class="parameter"><code>a</code></em> :</span></p></td>
402
 
<td>draw operation parameter</td>
403
 
</tr>
404
 
<tr>
405
 
<td><p><span class="term"><em class="parameter"><code>b</code></em> :</span></p></td>
406
 
<td>draw operation parameter</td>
407
 
</tr>
408
 
<tr>
409
 
<td><p><span class="term"><em class="parameter"><code>c</code></em> :</span></p></td>
410
 
<td>draw operation parameter</td>
411
 
</tr>
412
 
<tr>
413
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
414
 
<td>0 on success, or -1 on error.</td>
415
 
</tr>
416
 
</tbody>
417
 
</table></div>
418
 
</div>
419
 
<hr>
420
 
<div class="refsect2">
421
 
<a name="im-draw-line"></a><h3>im_draw_line ()</h3>
422
 
<pre class="programlisting"><span class="returnvalue">int</span>                 im_draw_line                        (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *image</code></em>,
423
 
                                                         <em class="parameter"><code><span class="type">int</span> x1</code></em>,
424
 
                                                         <em class="parameter"><code><span class="type">int</span> y1</code></em>,
425
 
                                                         <em class="parameter"><code><span class="type">int</span> x2</code></em>,
426
 
                                                         <em class="parameter"><code><span class="type">int</span> y2</code></em>,
427
 
                                                         <em class="parameter"><code><span class="type">VipsPel</span> *ink</code></em>);</pre>
428
 
<p>
429
 
Draws a 1-pixel-wide line on an image. 
430
 
</p>
431
 
<p>
432
 
<em class="parameter"><code>ink</code></em> is an array of bytes 
 
337
Coding. If <em class="parameter"><code>sub</code></em>
 
338
 has 1 band, the bands will be duplicated to match the
 
339
number of bands in <em class="parameter"><code>image</code></em>
 
340
. <em class="parameter"><code>sub</code></em>
 
341
 will be converted to <em class="parameter"><code>image</code></em>
 
342
's format, see
 
343
<code class="function">im_clip2fmt()</code>.</p>
 
344
<p>See also: <code class="function">im_insert()</code>.</p>
 
345
<div class="refsect3">
 
346
<a name="id-1.3.9.8.4.6"></a><h4>Parameters</h4>
 
347
<div class="informaltable"><table width="100%" border="0">
 
348
<colgroup>
 
349
<col width="150px" class="parameters_name">
 
350
<col class="parameters_description">
 
351
<col width="200px" class="parameters_annotations">
 
352
</colgroup>
 
353
<tbody>
 
354
<tr>
 
355
<td class="parameter_name"><p>image</p></td>
 
356
<td class="parameter_description"><p>image to draw on</p></td>
 
357
<td class="parameter_annotations"> </td>
 
358
</tr>
 
359
<tr>
 
360
<td class="parameter_name"><p>sub</p></td>
 
361
<td class="parameter_description"><p>image to draw</p></td>
 
362
<td class="parameter_annotations"> </td>
 
363
</tr>
 
364
<tr>
 
365
<td class="parameter_name"><p>x</p></td>
 
366
<td class="parameter_description"><p>position to insert</p></td>
 
367
<td class="parameter_annotations"> </td>
 
368
</tr>
 
369
<tr>
 
370
<td class="parameter_name"><p>y</p></td>
 
371
<td class="parameter_description"><p>position to insert</p></td>
 
372
<td class="parameter_annotations"> </td>
 
373
</tr>
 
374
</tbody>
 
375
</table></div>
 
376
</div>
 
377
<div class="refsect3">
 
378
<a name="id-1.3.9.8.4.7"></a><h4>Returns</h4>
 
379
<p> 0 on success, or -1 on error.</p>
 
380
<p></p>
 
381
</div>
 
382
</div>
 
383
<hr>
 
384
<div class="refsect2">
 
385
<a name="VipsPlotFn"></a><h3>VipsPlotFn ()</h3>
 
386
<pre class="programlisting"><span class="returnvalue">int</span>
 
387
<span class="c_punctuation">(</span>*VipsPlotFn<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *image</code></em>,
 
388
               <em class="parameter"><code><span class="type">int</span> x</code></em>,
 
389
               <em class="parameter"><code><span class="type">int</span> y</code></em>,
 
390
               <em class="parameter"><code><span class="type">void</span> *a</code></em>,
 
391
               <em class="parameter"><code><span class="type">void</span> *b</code></em>,
 
392
               <em class="parameter"><code><span class="type">void</span> *c</code></em>);</pre>
 
393
<p>A plot function, as used by <a class="link" href="libvips-inplace.html#im-draw-line-user" title="im_draw_line_user ()"><code class="function">im_draw_line_user()</code></a> to draw on an image.</p>
 
394
<div class="refsect3">
 
395
<a name="id-1.3.9.8.5.5"></a><h4>Parameters</h4>
 
396
<div class="informaltable"><table width="100%" border="0">
 
397
<colgroup>
 
398
<col width="150px" class="parameters_name">
 
399
<col class="parameters_description">
 
400
<col width="200px" class="parameters_annotations">
 
401
</colgroup>
 
402
<tbody>
 
403
<tr>
 
404
<td class="parameter_name"><p>image</p></td>
 
405
<td class="parameter_description"><p>image to draw on</p></td>
 
406
<td class="parameter_annotations"> </td>
 
407
</tr>
 
408
<tr>
 
409
<td class="parameter_name"><p>x</p></td>
 
410
<td class="parameter_description"><p>position to draw at</p></td>
 
411
<td class="parameter_annotations"> </td>
 
412
</tr>
 
413
<tr>
 
414
<td class="parameter_name"><p>y</p></td>
 
415
<td class="parameter_description"><p>position to draw at</p></td>
 
416
<td class="parameter_annotations"> </td>
 
417
</tr>
 
418
<tr>
 
419
<td class="parameter_name"><p>a</p></td>
 
420
<td class="parameter_description"><p>user data</p></td>
 
421
<td class="parameter_annotations"> </td>
 
422
</tr>
 
423
<tr>
 
424
<td class="parameter_name"><p>b</p></td>
 
425
<td class="parameter_description"><p>user data</p></td>
 
426
<td class="parameter_annotations"> </td>
 
427
</tr>
 
428
<tr>
 
429
<td class="parameter_name"><p>c</p></td>
 
430
<td class="parameter_description"><p>user data</p></td>
 
431
<td class="parameter_annotations"> </td>
 
432
</tr>
 
433
</tbody>
 
434
</table></div>
 
435
</div>
 
436
<div class="refsect3">
 
437
<a name="id-1.3.9.8.5.6"></a><h4>Returns</h4>
 
438
<p></p>
 
439
</div>
 
440
</div>
 
441
<hr>
 
442
<div class="refsect2">
 
443
<a name="im-draw-line-user"></a><h3>im_draw_line_user ()</h3>
 
444
<pre class="programlisting"><span class="returnvalue">int</span>
 
445
im_draw_line_user (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *image</code></em>,
 
446
                   <em class="parameter"><code><span class="type">int</span> x1</code></em>,
 
447
                   <em class="parameter"><code><span class="type">int</span> y1</code></em>,
 
448
                   <em class="parameter"><code><span class="type">int</span> x2</code></em>,
 
449
                   <em class="parameter"><code><span class="type">int</span> y2</code></em>,
 
450
                   <em class="parameter"><code><a class="link" href="libvips-inplace.html#VipsPlotFn" title="VipsPlotFn ()"><span class="type">VipsPlotFn</span></a> plot</code></em>,
 
451
                   <em class="parameter"><code><span class="type">void</span> *a</code></em>,
 
452
                   <em class="parameter"><code><span class="type">void</span> *b</code></em>,
 
453
                   <em class="parameter"><code><span class="type">void</span> *c</code></em>);</pre>
 
454
<p>Calls <em class="parameter"><code>plot</code></em>
 
455
 for every point on the line connecting <em class="parameter"><code>x1</code></em>
 
456
, <em class="parameter"><code>y1</code></em>
 
457
 and <em class="parameter"><code>x2</code></em>
 
458
, <em class="parameter"><code>y2</code></em>
 
459
.
 
460
If you pass <a class="link" href="libvips-inplace.html#im-draw-mask" title="im_draw_mask ()"><code class="function">im_draw_mask()</code></a> as the plot operation, you can draw wide lines
 
461
or lines with various brushes.</p>
 
462
<p>See also: <a class="link" href="libvips-inplace.html#im-draw-mask" title="im_draw_mask ()"><code class="function">im_draw_mask()</code></a>, <a class="link" href="libvips-inplace.html#im-draw-line" title="im_draw_line ()"><code class="function">im_draw_line()</code></a>, <a class="link" href="libvips-inplace.html#im-draw-circle" title="im_draw_circle ()"><code class="function">im_draw_circle()</code></a>.</p>
 
463
<div class="refsect3">
 
464
<a name="id-1.3.9.8.6.6"></a><h4>Parameters</h4>
 
465
<div class="informaltable"><table width="100%" border="0">
 
466
<colgroup>
 
467
<col width="150px" class="parameters_name">
 
468
<col class="parameters_description">
 
469
<col width="200px" class="parameters_annotations">
 
470
</colgroup>
 
471
<tbody>
 
472
<tr>
 
473
<td class="parameter_name"><p>image</p></td>
 
474
<td class="parameter_description"><p>image to draw on</p></td>
 
475
<td class="parameter_annotations"> </td>
 
476
</tr>
 
477
<tr>
 
478
<td class="parameter_name"><p>x1</p></td>
 
479
<td class="parameter_description"><p>start point</p></td>
 
480
<td class="parameter_annotations"> </td>
 
481
</tr>
 
482
<tr>
 
483
<td class="parameter_name"><p>y1</p></td>
 
484
<td class="parameter_description"><p>start point</p></td>
 
485
<td class="parameter_annotations"> </td>
 
486
</tr>
 
487
<tr>
 
488
<td class="parameter_name"><p>x2</p></td>
 
489
<td class="parameter_description"><p>end point</p></td>
 
490
<td class="parameter_annotations"> </td>
 
491
</tr>
 
492
<tr>
 
493
<td class="parameter_name"><p>y2</p></td>
 
494
<td class="parameter_description"><p>end point</p></td>
 
495
<td class="parameter_annotations"> </td>
 
496
</tr>
 
497
<tr>
 
498
<td class="parameter_name"><p>plot</p></td>
 
499
<td class="parameter_description"><p>draw operation</p></td>
 
500
<td class="parameter_annotations"> </td>
 
501
</tr>
 
502
<tr>
 
503
<td class="parameter_name"><p>a</p></td>
 
504
<td class="parameter_description"><p>draw operation parameter</p></td>
 
505
<td class="parameter_annotations"> </td>
 
506
</tr>
 
507
<tr>
 
508
<td class="parameter_name"><p>b</p></td>
 
509
<td class="parameter_description"><p>draw operation parameter</p></td>
 
510
<td class="parameter_annotations"> </td>
 
511
</tr>
 
512
<tr>
 
513
<td class="parameter_name"><p>c</p></td>
 
514
<td class="parameter_description"><p>draw operation parameter</p></td>
 
515
<td class="parameter_annotations"> </td>
 
516
</tr>
 
517
</tbody>
 
518
</table></div>
 
519
</div>
 
520
<div class="refsect3">
 
521
<a name="id-1.3.9.8.6.7"></a><h4>Returns</h4>
 
522
<p> 0 on success, or -1 on error.</p>
 
523
<p></p>
 
524
</div>
 
525
</div>
 
526
<hr>
 
527
<div class="refsect2">
 
528
<a name="im-draw-line"></a><h3>im_draw_line ()</h3>
 
529
<pre class="programlisting"><span class="returnvalue">int</span>
 
530
im_draw_line (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *image</code></em>,
 
531
              <em class="parameter"><code><span class="type">int</span> x1</code></em>,
 
532
              <em class="parameter"><code><span class="type">int</span> y1</code></em>,
 
533
              <em class="parameter"><code><span class="type">int</span> x2</code></em>,
 
534
              <em class="parameter"><code><span class="type">int</span> y2</code></em>,
 
535
              <em class="parameter"><code><span class="type">VipsPel</span> *ink</code></em>);</pre>
 
536
<p>Draws a 1-pixel-wide line on an image. </p>
 
537
<p><em class="parameter"><code>ink</code></em>
 
538
 is an array of bytes 
433
539
containing a valid pixel for the image's format.
434
 
It must have at least IM_IMAGE_SIZEOF_PEL( <em class="parameter"><code>image</code></em> ) bytes.
435
 
</p>
436
 
<p>
437
 
See also: <a class="link" href="libvips-inplace.html#im-draw-circle" title="im_draw_circle ()"><code class="function">im_draw_circle()</code></a>.
438
 
</p>
439
 
<div class="variablelist"><table border="0" class="variablelist">
 
540
It must have at least IM_IMAGE_SIZEOF_PEL( <em class="parameter"><code>image</code></em>
 
541
 ) bytes.</p>
 
542
<p>See also: <a class="link" href="libvips-inplace.html#im-draw-circle" title="im_draw_circle ()"><code class="function">im_draw_circle()</code></a>.</p>
 
543
<div class="refsect3">
 
544
<a name="id-1.3.9.8.7.7"></a><h4>Parameters</h4>
 
545
<div class="informaltable"><table width="100%" border="0">
440
546
<colgroup>
441
 
<col align="left" valign="top">
442
 
<col>
 
547
<col width="150px" class="parameters_name">
 
548
<col class="parameters_description">
 
549
<col width="200px" class="parameters_annotations">
443
550
</colgroup>
444
551
<tbody>
445
552
<tr>
446
 
<td><p><span class="term"><em class="parameter"><code>image</code></em> :</span></p></td>
447
 
<td>image to draw on</td>
448
 
</tr>
449
 
<tr>
450
 
<td><p><span class="term"><em class="parameter"><code>x1</code></em> :</span></p></td>
451
 
<td>start point</td>
452
 
</tr>
453
 
<tr>
454
 
<td><p><span class="term"><em class="parameter"><code>y1</code></em> :</span></p></td>
455
 
<td>start point</td>
456
 
</tr>
457
 
<tr>
458
 
<td><p><span class="term"><em class="parameter"><code>x2</code></em> :</span></p></td>
459
 
<td>end point</td>
460
 
</tr>
461
 
<tr>
462
 
<td><p><span class="term"><em class="parameter"><code>y2</code></em> :</span></p></td>
463
 
<td>end point</td>
464
 
</tr>
465
 
<tr>
466
 
<td><p><span class="term"><em class="parameter"><code>ink</code></em> :</span></p></td>
467
 
<td>value to draw</td>
468
 
</tr>
469
 
<tr>
470
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
471
 
<td>0 on success, or -1 on error.</td>
 
553
<td class="parameter_name"><p>image</p></td>
 
554
<td class="parameter_description"><p>image to draw on</p></td>
 
555
<td class="parameter_annotations"> </td>
 
556
</tr>
 
557
<tr>
 
558
<td class="parameter_name"><p>x1</p></td>
 
559
<td class="parameter_description"><p>start point</p></td>
 
560
<td class="parameter_annotations"> </td>
 
561
</tr>
 
562
<tr>
 
563
<td class="parameter_name"><p>y1</p></td>
 
564
<td class="parameter_description"><p>start point</p></td>
 
565
<td class="parameter_annotations"> </td>
 
566
</tr>
 
567
<tr>
 
568
<td class="parameter_name"><p>x2</p></td>
 
569
<td class="parameter_description"><p>end point</p></td>
 
570
<td class="parameter_annotations"> </td>
 
571
</tr>
 
572
<tr>
 
573
<td class="parameter_name"><p>y2</p></td>
 
574
<td class="parameter_description"><p>end point</p></td>
 
575
<td class="parameter_annotations"> </td>
 
576
</tr>
 
577
<tr>
 
578
<td class="parameter_name"><p>ink</p></td>
 
579
<td class="parameter_description"><p>value to draw</p></td>
 
580
<td class="parameter_annotations"> </td>
472
581
</tr>
473
582
</tbody>
474
583
</table></div>
475
584
</div>
 
585
<div class="refsect3">
 
586
<a name="id-1.3.9.8.7.8"></a><h4>Returns</h4>
 
587
<p> 0 on success, or -1 on error.</p>
 
588
<p></p>
 
589
</div>
 
590
</div>
476
591
<hr>
477
592
<div class="refsect2">
478
 
<a name="im-lineset"></a><h3>im_lineset ()</h3>
479
 
<pre class="programlisting"><span class="returnvalue">int</span>                 im_lineset                          (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
480
 
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>,
481
 
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *mask</code></em>,
482
 
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *ink</code></em>,
483
 
                                                         <em class="parameter"><code><span class="type">int</span> n</code></em>,
484
 
                                                         <em class="parameter"><code><span class="type">int</span> *x1v</code></em>,
485
 
                                                         <em class="parameter"><code><span class="type">int</span> *y1v</code></em>,
486
 
                                                         <em class="parameter"><code><span class="type">int</span> *x2v</code></em>,
487
 
                                                         <em class="parameter"><code><span class="type">int</span> *y2v</code></em>);</pre>
 
593
<a name="im-lineset"></a><h3>im_lineset ()</h3>
 
594
<pre class="programlisting"><span class="returnvalue">int</span>
 
595
im_lineset (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
 
596
            <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>,
 
597
            <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *mask</code></em>,
 
598
            <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *ink</code></em>,
 
599
            <em class="parameter"><code><span class="type">int</span> n</code></em>,
 
600
            <em class="parameter"><code><span class="type">int</span> *x1v</code></em>,
 
601
            <em class="parameter"><code><span class="type">int</span> *y1v</code></em>,
 
602
            <em class="parameter"><code><span class="type">int</span> *x2v</code></em>,
 
603
            <em class="parameter"><code><span class="type">int</span> *y2v</code></em>);</pre>
488
604
<p>
489
605
</p>
 
606
<div class="refsect3">
 
607
<a name="id-1.3.9.8.8.5"></a><h4>Returns</h4>
 
608
<p></p>
 
609
</div>
490
610
</div>
491
611
<hr>
492
612
<div class="refsect2">
493
 
<a name="im-draw-flood"></a><h3>im_draw_flood ()</h3>
494
 
<pre class="programlisting"><span class="returnvalue">int</span>                 im_draw_flood                       (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *image</code></em>,
495
 
                                                         <em class="parameter"><code><span class="type">int</span> x</code></em>,
496
 
                                                         <em class="parameter"><code><span class="type">int</span> y</code></em>,
497
 
                                                         <em class="parameter"><code><span class="type">VipsPel</span> *ink</code></em>,
498
 
                                                         <em class="parameter"><code><a class="link" href="libvips-rect.html#VipsRect" title="VipsRect"><span class="type">VipsRect</span></a> *dout</code></em>);</pre>
499
 
<p>
500
 
Flood-fill <em class="parameter"><code>image</code></em> with <em class="parameter"><code>ink</code></em>, starting at position <em class="parameter"><code>x</code></em>, <em class="parameter"><code>y</code></em>. The filled area is
 
613
<a name="im-draw-flood"></a><h3>im_draw_flood ()</h3>
 
614
<pre class="programlisting"><span class="returnvalue">int</span>
 
615
im_draw_flood (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *image</code></em>,
 
616
               <em class="parameter"><code><span class="type">int</span> x</code></em>,
 
617
               <em class="parameter"><code><span class="type">int</span> y</code></em>,
 
618
               <em class="parameter"><code><span class="type">VipsPel</span> *ink</code></em>,
 
619
               <em class="parameter"><code><a class="link" href="libvips-rect.html#VipsRect" title="VipsRect"><span class="type">VipsRect</span></a> *dout</code></em>);</pre>
 
620
<p>Flood-fill <em class="parameter"><code>image</code></em>
 
621
 with <em class="parameter"><code>ink</code></em>
 
622
, starting at position <em class="parameter"><code>x</code></em>
 
623
, <em class="parameter"><code>y</code></em>
 
624
. The filled area is
501
625
bounded by pixels that are equal to the ink colour, in other words, it
502
 
searches for pixels enclosed by a line of <em class="parameter"><code>ink</code></em>.
503
 
</p>
504
 
<p>
505
 
The bounding box of the modified pixels is returned in <em class="parameter"><code>dout</code></em>. <em class="parameter"><code>dout</code></em> may be
506
 
NULL.
507
 
</p>
508
 
<p>
509
 
See also: <a class="link" href="libvips-inplace.html#im-draw-flood-blob" title="im_draw_flood_blob ()"><code class="function">im_draw_flood_blob()</code></a>, <a class="link" href="libvips-inplace.html#im-draw-flood-other" title="im_draw_flood_other ()"><code class="function">im_draw_flood_other()</code></a>.
510
 
</p>
511
 
<div class="variablelist"><table border="0" class="variablelist">
 
626
searches for pixels enclosed by a line of <em class="parameter"><code>ink</code></em>
 
627
.</p>
 
628
<p>The bounding box of the modified pixels is returned in <em class="parameter"><code>dout</code></em>
 
629
. <em class="parameter"><code>dout</code></em>
 
630
 may be
 
631
NULL.</p>
 
632
<p>See also: <a class="link" href="libvips-inplace.html#im-draw-flood-blob" title="im_draw_flood_blob ()"><code class="function">im_draw_flood_blob()</code></a>, <a class="link" href="libvips-inplace.html#im-draw-flood-other" title="im_draw_flood_other ()"><code class="function">im_draw_flood_other()</code></a>.</p>
 
633
<div class="refsect3">
 
634
<a name="id-1.3.9.8.9.7"></a><h4>Parameters</h4>
 
635
<div class="informaltable"><table width="100%" border="0">
512
636
<colgroup>
513
 
<col align="left" valign="top">
514
 
<col>
 
637
<col width="150px" class="parameters_name">
 
638
<col class="parameters_description">
 
639
<col width="200px" class="parameters_annotations">
515
640
</colgroup>
516
641
<tbody>
517
642
<tr>
518
 
<td><p><span class="term"><em class="parameter"><code>image</code></em> :</span></p></td>
519
 
<td>image to fill</td>
520
 
</tr>
521
 
<tr>
522
 
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
523
 
<td>position to start fill</td>
524
 
</tr>
525
 
<tr>
526
 
<td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
527
 
<td>position to start fill</td>
528
 
</tr>
529
 
<tr>
530
 
<td><p><span class="term"><em class="parameter"><code>ink</code></em> :</span></p></td>
531
 
<td>colour to fill with</td>
532
 
</tr>
533
 
<tr>
534
 
<td><p><span class="term"><em class="parameter"><code>dout</code></em> :</span></p></td>
535
 
<td>output the bounding box of the filled area</td>
536
 
</tr>
537
 
<tr>
538
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
539
 
<td>0 on success, or -1 on error.</td>
 
643
<td class="parameter_name"><p>image</p></td>
 
644
<td class="parameter_description"><p>image to fill</p></td>
 
645
<td class="parameter_annotations"> </td>
 
646
</tr>
 
647
<tr>
 
648
<td class="parameter_name"><p>x</p></td>
 
649
<td class="parameter_description"><p>position to start fill</p></td>
 
650
<td class="parameter_annotations"> </td>
 
651
</tr>
 
652
<tr>
 
653
<td class="parameter_name"><p>y</p></td>
 
654
<td class="parameter_description"><p>position to start fill</p></td>
 
655
<td class="parameter_annotations"> </td>
 
656
</tr>
 
657
<tr>
 
658
<td class="parameter_name"><p>ink</p></td>
 
659
<td class="parameter_description"><p>colour to fill with</p></td>
 
660
<td class="parameter_annotations"> </td>
 
661
</tr>
 
662
<tr>
 
663
<td class="parameter_name"><p>dout</p></td>
 
664
<td class="parameter_description"><p>output the bounding box of the filled area </p></td>
 
665
<td class="parameter_annotations"> </td>
540
666
</tr>
541
667
</tbody>
542
668
</table></div>
543
669
</div>
 
670
<div class="refsect3">
 
671
<a name="id-1.3.9.8.9.8"></a><h4>Returns</h4>
 
672
<p> 0 on success, or -1 on error.</p>
 
673
<p></p>
 
674
</div>
 
675
</div>
544
676
<hr>
545
677
<div class="refsect2">
546
 
<a name="im-draw-flood-blob"></a><h3>im_draw_flood_blob ()</h3>
547
 
<pre class="programlisting"><span class="returnvalue">int</span>                 im_draw_flood_blob                  (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *image</code></em>,
548
 
                                                         <em class="parameter"><code><span class="type">int</span> x</code></em>,
549
 
                                                         <em class="parameter"><code><span class="type">int</span> y</code></em>,
550
 
                                                         <em class="parameter"><code><span class="type">VipsPel</span> *ink</code></em>,
551
 
                                                         <em class="parameter"><code><a class="link" href="libvips-rect.html#VipsRect" title="VipsRect"><span class="type">VipsRect</span></a> *dout</code></em>);</pre>
552
 
<p>
553
 
Flood-fill <em class="parameter"><code>image</code></em> with <em class="parameter"><code>ink</code></em>, starting at position <em class="parameter"><code>x</code></em>, <em class="parameter"><code>y</code></em>. The filled area is
 
678
<a name="im-draw-flood-blob"></a><h3>im_draw_flood_blob ()</h3>
 
679
<pre class="programlisting"><span class="returnvalue">int</span>
 
680
im_draw_flood_blob (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *image</code></em>,
 
681
                    <em class="parameter"><code><span class="type">int</span> x</code></em>,
 
682
                    <em class="parameter"><code><span class="type">int</span> y</code></em>,
 
683
                    <em class="parameter"><code><span class="type">VipsPel</span> *ink</code></em>,
 
684
                    <em class="parameter"><code><a class="link" href="libvips-rect.html#VipsRect" title="VipsRect"><span class="type">VipsRect</span></a> *dout</code></em>);</pre>
 
685
<p>Flood-fill <em class="parameter"><code>image</code></em>
 
686
 with <em class="parameter"><code>ink</code></em>
 
687
, starting at position <em class="parameter"><code>x</code></em>
 
688
, <em class="parameter"><code>y</code></em>
 
689
. The filled area is
554
690
bounded by pixels that are equal to the start pixel, in other words, it
555
 
searches for a blob of same-coloured pixels.
556
 
</p>
557
 
<p>
558
 
The bounding box of the modified pixels is returned in <em class="parameter"><code>dout</code></em>. <em class="parameter"><code>dout</code></em> may be
559
 
NULL.
560
 
</p>
561
 
<p>
562
 
See also: <a class="link" href="libvips-inplace.html#im-draw-flood" title="im_draw_flood ()"><code class="function">im_draw_flood()</code></a>, <a class="link" href="libvips-inplace.html#im-draw-flood-other" title="im_draw_flood_other ()"><code class="function">im_draw_flood_other()</code></a>, <a class="link" href="libvips-inplace.html#im-draw-flood-blob" title="im_draw_flood_blob ()"><code class="function">im_draw_flood_blob()</code></a>.
563
 
</p>
564
 
<div class="variablelist"><table border="0" class="variablelist">
565
 
<colgroup>
566
 
<col align="left" valign="top">
567
 
<col>
568
 
</colgroup>
569
 
<tbody>
570
 
<tr>
571
 
<td><p><span class="term"><em class="parameter"><code>image</code></em> :</span></p></td>
572
 
<td>image to fill</td>
573
 
</tr>
574
 
<tr>
575
 
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
576
 
<td>position to start fill</td>
577
 
</tr>
578
 
<tr>
579
 
<td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
580
 
<td>position to start fill</td>
581
 
</tr>
582
 
<tr>
583
 
<td><p><span class="term"><em class="parameter"><code>ink</code></em> :</span></p></td>
584
 
<td>colour to fill with</td>
585
 
</tr>
586
 
<tr>
587
 
<td><p><span class="term"><em class="parameter"><code>dout</code></em> :</span></p></td>
588
 
<td>output the bounding box of the filled area</td>
589
 
</tr>
590
 
<tr>
591
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
592
 
<td>0 on success, or -1 on error.</td>
593
 
</tr>
594
 
</tbody>
595
 
</table></div>
596
 
</div>
597
 
<hr>
598
 
<div class="refsect2">
599
 
<a name="im-draw-flood-other"></a><h3>im_draw_flood_other ()</h3>
600
 
<pre class="programlisting"><span class="returnvalue">int</span>                 im_draw_flood_other                 (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *image</code></em>,
601
 
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *test</code></em>,
602
 
                                                         <em class="parameter"><code><span class="type">int</span> x</code></em>,
603
 
                                                         <em class="parameter"><code><span class="type">int</span> y</code></em>,
604
 
                                                         <em class="parameter"><code><span class="type">int</span> serial</code></em>,
605
 
                                                         <em class="parameter"><code><a class="link" href="libvips-rect.html#VipsRect" title="VipsRect"><span class="type">VipsRect</span></a> *dout</code></em>);</pre>
606
 
<p>
607
 
Flood-fill <em class="parameter"><code>image</code></em> with <em class="parameter"><code>serial</code></em>, starting at position <em class="parameter"><code>x</code></em>, <em class="parameter"><code>y</code></em>. The filled 
608
 
area is bounded by pixels in <em class="parameter"><code>test</code></em> that are equal to the start pixel, in 
609
 
other words, it searches <em class="parameter"><code>test</code></em> for a blob of same-coloured pixels, marking 
610
 
those pixels in <em class="parameter"><code>image</code></em> with <em class="parameter"><code>serial</code></em>.
611
 
</p>
612
 
<p>
613
 
The bounding box of the modified pixels is returned in <em class="parameter"><code>dout</code></em>. <em class="parameter"><code>dout</code></em> may be
614
 
NULL.
615
 
</p>
616
 
<p>
617
 
See also: <a class="link" href="libvips-inplace.html#im-draw-flood" title="im_draw_flood ()"><code class="function">im_draw_flood()</code></a>, <a class="link" href="libvips-morphology.html#im-label-regions" title="im_label_regions ()"><code class="function">im_label_regions()</code></a>, <a class="link" href="libvips-inplace.html#im-draw-flood-blob" title="im_draw_flood_blob ()"><code class="function">im_draw_flood_blob()</code></a>.
618
 
</p>
619
 
<div class="variablelist"><table border="0" class="variablelist">
620
 
<colgroup>
621
 
<col align="left" valign="top">
622
 
<col>
623
 
</colgroup>
624
 
<tbody>
625
 
<tr>
626
 
<td><p><span class="term"><em class="parameter"><code>image</code></em> :</span></p></td>
627
 
<td>image to mark</td>
628
 
</tr>
629
 
<tr>
630
 
<td><p><span class="term"><em class="parameter"><code>test</code></em> :</span></p></td>
631
 
<td>image to test</td>
632
 
</tr>
633
 
<tr>
634
 
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
635
 
<td>position to start fill</td>
636
 
</tr>
637
 
<tr>
638
 
<td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
639
 
<td>position to start fill</td>
640
 
</tr>
641
 
<tr>
642
 
<td><p><span class="term"><em class="parameter"><code>serial</code></em> :</span></p></td>
643
 
<td>mark pixels with this number</td>
644
 
</tr>
645
 
<tr>
646
 
<td><p><span class="term"><em class="parameter"><code>dout</code></em> :</span></p></td>
647
 
<td>output the bounding box of the filled area</td>
648
 
</tr>
649
 
<tr>
650
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
651
 
<td>0 on success, or -1 on error.</td>
652
 
</tr>
653
 
</tbody>
654
 
</table></div>
655
 
</div>
656
 
<hr>
657
 
<div class="refsect2">
658
 
<a name="im-draw-mask"></a><h3>im_draw_mask ()</h3>
659
 
<pre class="programlisting"><span class="returnvalue">int</span>                 im_draw_mask                        (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *image</code></em>,
660
 
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *mask_im</code></em>,
661
 
                                                         <em class="parameter"><code><span class="type">int</span> x</code></em>,
662
 
                                                         <em class="parameter"><code><span class="type">int</span> y</code></em>,
663
 
                                                         <em class="parameter"><code><span class="type">VipsPel</span> *ink</code></em>);</pre>
664
 
<p>
665
 
Draw a mask on the image. <em class="parameter"><code>mask_im</code></em> is a monochrome 8-bit image with 0/255
666
 
for transparent or <em class="parameter"><code>ink</code></em> coloured points. Intermediate values blend the ink
667
 
with the pixel. Use with <a href="http://http://www.vips.ecs.soton.ac.uk/libvips-conversion.html#im-text"><code class="function">im_text()</code></a> to draw text on an image.
668
 
</p>
669
 
<p>
670
 
<em class="parameter"><code>ink</code></em> is an array of bytes 
 
691
searches for a blob of same-coloured pixels.</p>
 
692
<p>The bounding box of the modified pixels is returned in <em class="parameter"><code>dout</code></em>
 
693
. <em class="parameter"><code>dout</code></em>
 
694
 may be
 
695
NULL.</p>
 
696
<p>See also: <a class="link" href="libvips-inplace.html#im-draw-flood" title="im_draw_flood ()"><code class="function">im_draw_flood()</code></a>, <a class="link" href="libvips-inplace.html#im-draw-flood-other" title="im_draw_flood_other ()"><code class="function">im_draw_flood_other()</code></a>, <a class="link" href="libvips-inplace.html#im-draw-flood-blob" title="im_draw_flood_blob ()"><code class="function">im_draw_flood_blob()</code></a>.</p>
 
697
<div class="refsect3">
 
698
<a name="id-1.3.9.8.10.7"></a><h4>Parameters</h4>
 
699
<div class="informaltable"><table width="100%" border="0">
 
700
<colgroup>
 
701
<col width="150px" class="parameters_name">
 
702
<col class="parameters_description">
 
703
<col width="200px" class="parameters_annotations">
 
704
</colgroup>
 
705
<tbody>
 
706
<tr>
 
707
<td class="parameter_name"><p>image</p></td>
 
708
<td class="parameter_description"><p>image to fill</p></td>
 
709
<td class="parameter_annotations"> </td>
 
710
</tr>
 
711
<tr>
 
712
<td class="parameter_name"><p>x</p></td>
 
713
<td class="parameter_description"><p>position to start fill</p></td>
 
714
<td class="parameter_annotations"> </td>
 
715
</tr>
 
716
<tr>
 
717
<td class="parameter_name"><p>y</p></td>
 
718
<td class="parameter_description"><p>position to start fill</p></td>
 
719
<td class="parameter_annotations"> </td>
 
720
</tr>
 
721
<tr>
 
722
<td class="parameter_name"><p>ink</p></td>
 
723
<td class="parameter_description"><p>colour to fill with</p></td>
 
724
<td class="parameter_annotations"> </td>
 
725
</tr>
 
726
<tr>
 
727
<td class="parameter_name"><p>dout</p></td>
 
728
<td class="parameter_description"><p>output the bounding box of the filled area </p></td>
 
729
<td class="parameter_annotations"> </td>
 
730
</tr>
 
731
</tbody>
 
732
</table></div>
 
733
</div>
 
734
<div class="refsect3">
 
735
<a name="id-1.3.9.8.10.8"></a><h4>Returns</h4>
 
736
<p> 0 on success, or -1 on error.</p>
 
737
<p></p>
 
738
</div>
 
739
</div>
 
740
<hr>
 
741
<div class="refsect2">
 
742
<a name="im-draw-flood-other"></a><h3>im_draw_flood_other ()</h3>
 
743
<pre class="programlisting"><span class="returnvalue">int</span>
 
744
im_draw_flood_other (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *image</code></em>,
 
745
                     <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *test</code></em>,
 
746
                     <em class="parameter"><code><span class="type">int</span> x</code></em>,
 
747
                     <em class="parameter"><code><span class="type">int</span> y</code></em>,
 
748
                     <em class="parameter"><code><span class="type">int</span> serial</code></em>,
 
749
                     <em class="parameter"><code><a class="link" href="libvips-rect.html#VipsRect" title="VipsRect"><span class="type">VipsRect</span></a> *dout</code></em>);</pre>
 
750
<p>Flood-fill <em class="parameter"><code>image</code></em>
 
751
 with <em class="parameter"><code>serial</code></em>
 
752
, starting at position <em class="parameter"><code>x</code></em>
 
753
, <em class="parameter"><code>y</code></em>
 
754
. The filled 
 
755
area is bounded by pixels in <em class="parameter"><code>test</code></em>
 
756
 that are equal to the start pixel, in 
 
757
other words, it searches <em class="parameter"><code>test</code></em>
 
758
 for a blob of same-coloured pixels, marking 
 
759
those pixels in <em class="parameter"><code>image</code></em>
 
760
 with <em class="parameter"><code>serial</code></em>
 
761
.</p>
 
762
<p>The bounding box of the modified pixels is returned in <em class="parameter"><code>dout</code></em>
 
763
. <em class="parameter"><code>dout</code></em>
 
764
 may be
 
765
NULL.</p>
 
766
<p>See also: <a class="link" href="libvips-inplace.html#im-draw-flood" title="im_draw_flood ()"><code class="function">im_draw_flood()</code></a>, <a class="link" href="libvips-morphology.html#im-label-regions" title="im_label_regions ()"><code class="function">im_label_regions()</code></a>, <a class="link" href="libvips-inplace.html#im-draw-flood-blob" title="im_draw_flood_blob ()"><code class="function">im_draw_flood_blob()</code></a>.</p>
 
767
<div class="refsect3">
 
768
<a name="id-1.3.9.8.11.7"></a><h4>Parameters</h4>
 
769
<div class="informaltable"><table width="100%" border="0">
 
770
<colgroup>
 
771
<col width="150px" class="parameters_name">
 
772
<col class="parameters_description">
 
773
<col width="200px" class="parameters_annotations">
 
774
</colgroup>
 
775
<tbody>
 
776
<tr>
 
777
<td class="parameter_name"><p>image</p></td>
 
778
<td class="parameter_description"><p>image to mark</p></td>
 
779
<td class="parameter_annotations"> </td>
 
780
</tr>
 
781
<tr>
 
782
<td class="parameter_name"><p>test</p></td>
 
783
<td class="parameter_description"><p>image to test</p></td>
 
784
<td class="parameter_annotations"> </td>
 
785
</tr>
 
786
<tr>
 
787
<td class="parameter_name"><p>x</p></td>
 
788
<td class="parameter_description"><p>position to start fill</p></td>
 
789
<td class="parameter_annotations"> </td>
 
790
</tr>
 
791
<tr>
 
792
<td class="parameter_name"><p>y</p></td>
 
793
<td class="parameter_description"><p>position to start fill</p></td>
 
794
<td class="parameter_annotations"> </td>
 
795
</tr>
 
796
<tr>
 
797
<td class="parameter_name"><p>serial</p></td>
 
798
<td class="parameter_description"><p>mark pixels with this number</p></td>
 
799
<td class="parameter_annotations"> </td>
 
800
</tr>
 
801
<tr>
 
802
<td class="parameter_name"><p>dout</p></td>
 
803
<td class="parameter_description"><p>output the bounding box of the filled area </p></td>
 
804
<td class="parameter_annotations"> </td>
 
805
</tr>
 
806
</tbody>
 
807
</table></div>
 
808
</div>
 
809
<div class="refsect3">
 
810
<a name="id-1.3.9.8.11.8"></a><h4>Returns</h4>
 
811
<p> 0 on success, or -1 on error.</p>
 
812
<p></p>
 
813
</div>
 
814
</div>
 
815
<hr>
 
816
<div class="refsect2">
 
817
<a name="im-draw-mask"></a><h3>im_draw_mask ()</h3>
 
818
<pre class="programlisting"><span class="returnvalue">int</span>
 
819
im_draw_mask (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *image</code></em>,
 
820
              <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *mask_im</code></em>,
 
821
              <em class="parameter"><code><span class="type">int</span> x</code></em>,
 
822
              <em class="parameter"><code><span class="type">int</span> y</code></em>,
 
823
              <em class="parameter"><code><span class="type">VipsPel</span> *ink</code></em>);</pre>
 
824
<p>Draw a mask on the image. <em class="parameter"><code>mask_im</code></em>
 
825
 is a monochrome 8-bit image with 0/255
 
826
for transparent or <em class="parameter"><code>ink</code></em>
 
827
 coloured points. Intermediate values blend the ink
 
828
with the pixel. Use with <code class="function">im_text()</code> to draw text on an image.</p>
 
829
<p><em class="parameter"><code>ink</code></em>
 
830
 is an array of bytes 
671
831
containing a valid pixel for the image's format.
672
 
It must have at least IM_IMAGE_SIZEOF_PEL( <em class="parameter"><code>image</code></em> ) bytes.
673
 
</p>
674
 
<p>
675
 
See also: <a class="link" href="libvips-inplace.html#im-draw-circle" title="im_draw_circle ()"><code class="function">im_draw_circle()</code></a>, <a href="http://http://www.vips.ecs.soton.ac.uk/libvips-conversion.html#im-text"><code class="function">im_text()</code></a>, <a class="link" href="libvips-inplace.html#im-draw-line-user" title="im_draw_line_user ()"><code class="function">im_draw_line_user()</code></a>.
676
 
</p>
677
 
<div class="variablelist"><table border="0" class="variablelist">
678
 
<colgroup>
679
 
<col align="left" valign="top">
680
 
<col>
681
 
</colgroup>
682
 
<tbody>
683
 
<tr>
684
 
<td><p><span class="term"><em class="parameter"><code>image</code></em> :</span></p></td>
685
 
<td>image to draw on</td>
686
 
</tr>
687
 
<tr>
688
 
<td><p><span class="term"><em class="parameter"><code>mask_im</code></em> :</span></p></td>
689
 
<td>mask of 0/255 values showing where to plot</td>
690
 
</tr>
691
 
<tr>
692
 
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
693
 
<td>draw mask here</td>
694
 
</tr>
695
 
<tr>
696
 
<td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
697
 
<td>draw mask here</td>
698
 
</tr>
699
 
<tr>
700
 
<td><p><span class="term"><em class="parameter"><code>ink</code></em> :</span></p></td>
701
 
<td>value to draw</td>
702
 
</tr>
703
 
<tr>
704
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
705
 
<td>0 on success, or -1 on error.</td>
706
 
</tr>
707
 
</tbody>
708
 
</table></div>
709
 
</div>
710
 
<hr>
711
 
<div class="refsect2">
712
 
<a name="im-draw-point"></a><h3>im_draw_point ()</h3>
713
 
<pre class="programlisting"><span class="returnvalue">int</span>                 im_draw_point                       (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *image</code></em>,
714
 
                                                         <em class="parameter"><code><span class="type">int</span> x</code></em>,
715
 
                                                         <em class="parameter"><code><span class="type">int</span> y</code></em>,
716
 
                                                         <em class="parameter"><code><span class="type">VipsPel</span> *ink</code></em>);</pre>
717
 
<p>
718
 
Draws a single point on an image. 
719
 
</p>
720
 
<p>
721
 
<em class="parameter"><code>ink</code></em> is an array of bytes containing a valid pixel for the image's format.
722
 
It must have at least IM_IMAGE_SIZEOF_PEL( <em class="parameter"><code>im</code></em> ) bytes.
723
 
</p>
724
 
<p>
725
 
See also: <a class="link" href="libvips-inplace.html#im-draw-line" title="im_draw_line ()"><code class="function">im_draw_line()</code></a>.
726
 
</p>
727
 
<div class="variablelist"><table border="0" class="variablelist">
728
 
<colgroup>
729
 
<col align="left" valign="top">
730
 
<col>
731
 
</colgroup>
732
 
<tbody>
733
 
<tr>
734
 
<td><p><span class="term"><em class="parameter"><code>image</code></em> :</span></p></td>
735
 
<td>image to draw on</td>
736
 
</tr>
737
 
<tr>
738
 
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
739
 
<td>position to draw</td>
740
 
</tr>
741
 
<tr>
742
 
<td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
743
 
<td>position to draw</td>
744
 
</tr>
745
 
<tr>
746
 
<td><p><span class="term"><em class="parameter"><code>ink</code></em> :</span></p></td>
747
 
<td>value to draw</td>
748
 
</tr>
749
 
<tr>
750
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
751
 
<td>0 on success, or -1 on error.</td>
752
 
</tr>
753
 
</tbody>
754
 
</table></div>
755
 
</div>
756
 
<hr>
757
 
<div class="refsect2">
758
 
<a name="im-read-point"></a><h3>im_read_point ()</h3>
759
 
<pre class="programlisting"><span class="returnvalue">int</span>                 im_read_point                       (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *image</code></em>,
760
 
                                                         <em class="parameter"><code><span class="type">int</span> x</code></em>,
761
 
                                                         <em class="parameter"><code><span class="type">int</span> y</code></em>,
762
 
                                                         <em class="parameter"><code><span class="type">VipsPel</span> *ink</code></em>);</pre>
763
 
<p>
764
 
Reads a single point on an image. 
765
 
</p>
766
 
<p>
767
 
<em class="parameter"><code>ink</code></em> is an array of bytes to contain a valid pixel for the image's format.
768
 
It must have at least IM_IMAGE_SIZEOF_PEL( <em class="parameter"><code>im</code></em> ) bytes.
769
 
</p>
770
 
<p>
771
 
See also: <a class="link" href="libvips-inplace.html#im-draw-point" title="im_draw_point ()"><code class="function">im_draw_point()</code></a>.
772
 
</p>
773
 
<div class="variablelist"><table border="0" class="variablelist">
774
 
<colgroup>
775
 
<col align="left" valign="top">
776
 
<col>
777
 
</colgroup>
778
 
<tbody>
779
 
<tr>
780
 
<td><p><span class="term"><em class="parameter"><code>image</code></em> :</span></p></td>
781
 
<td>image to read from</td>
782
 
</tr>
783
 
<tr>
784
 
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
785
 
<td>position to read</td>
786
 
</tr>
787
 
<tr>
788
 
<td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
789
 
<td>position to read</td>
790
 
</tr>
791
 
<tr>
792
 
<td><p><span class="term"><em class="parameter"><code>ink</code></em> :</span></p></td>
793
 
<td>read value here</td>
794
 
</tr>
795
 
<tr>
796
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
797
 
<td>0 on success, or -1 on error.</td>
798
 
</tr>
799
 
</tbody>
800
 
</table></div>
801
 
</div>
802
 
<hr>
803
 
<div class="refsect2">
804
 
<a name="im-draw-smudge"></a><h3>im_draw_smudge ()</h3>
805
 
<pre class="programlisting"><span class="returnvalue">int</span>                 im_draw_smudge                      (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *image</code></em>,
806
 
                                                         <em class="parameter"><code><span class="type">int</span> left</code></em>,
807
 
                                                         <em class="parameter"><code><span class="type">int</span> top</code></em>,
808
 
                                                         <em class="parameter"><code><span class="type">int</span> width</code></em>,
809
 
                                                         <em class="parameter"><code><span class="type">int</span> height</code></em>);</pre>
810
 
<p>
811
 
Smudge a section of <em class="parameter"><code>image</code></em>. Each pixel in the area <em class="parameter"><code>left</code></em>, <em class="parameter"><code>top</code></em>, <em class="parameter"><code>width</code></em>,
812
 
<em class="parameter"><code>height</code></em> is replaced by the average of the surrounding 3x3 pixels. 
813
 
</p>
814
 
<p>
815
 
This an inplace operation, so <em class="parameter"><code>image</code></em> is changed. It does not thread and will
 
832
It must have at least IM_IMAGE_SIZEOF_PEL( <em class="parameter"><code>image</code></em>
 
833
 ) bytes.</p>
 
834
<p>See also: <a class="link" href="libvips-inplace.html#im-draw-circle" title="im_draw_circle ()"><code class="function">im_draw_circle()</code></a>, <code class="function">im_text()</code>, <a class="link" href="libvips-inplace.html#im-draw-line-user" title="im_draw_line_user ()"><code class="function">im_draw_line_user()</code></a>.</p>
 
835
<div class="refsect3">
 
836
<a name="id-1.3.9.8.12.7"></a><h4>Parameters</h4>
 
837
<div class="informaltable"><table width="100%" border="0">
 
838
<colgroup>
 
839
<col width="150px" class="parameters_name">
 
840
<col class="parameters_description">
 
841
<col width="200px" class="parameters_annotations">
 
842
</colgroup>
 
843
<tbody>
 
844
<tr>
 
845
<td class="parameter_name"><p>image</p></td>
 
846
<td class="parameter_description"><p>image to draw on</p></td>
 
847
<td class="parameter_annotations"> </td>
 
848
</tr>
 
849
<tr>
 
850
<td class="parameter_name"><p>mask_im</p></td>
 
851
<td class="parameter_description"><p>mask of 0/255 values showing where to plot</p></td>
 
852
<td class="parameter_annotations"> </td>
 
853
</tr>
 
854
<tr>
 
855
<td class="parameter_name"><p>x</p></td>
 
856
<td class="parameter_description"><p>draw mask here</p></td>
 
857
<td class="parameter_annotations"> </td>
 
858
</tr>
 
859
<tr>
 
860
<td class="parameter_name"><p>y</p></td>
 
861
<td class="parameter_description"><p>draw mask here</p></td>
 
862
<td class="parameter_annotations"> </td>
 
863
</tr>
 
864
<tr>
 
865
<td class="parameter_name"><p>ink</p></td>
 
866
<td class="parameter_description"><p>value to draw</p></td>
 
867
<td class="parameter_annotations"> </td>
 
868
</tr>
 
869
</tbody>
 
870
</table></div>
 
871
</div>
 
872
<div class="refsect3">
 
873
<a name="id-1.3.9.8.12.8"></a><h4>Returns</h4>
 
874
<p> 0 on success, or -1 on error.</p>
 
875
<p></p>
 
876
</div>
 
877
</div>
 
878
<hr>
 
879
<div class="refsect2">
 
880
<a name="im-draw-point"></a><h3>im_draw_point ()</h3>
 
881
<pre class="programlisting"><span class="returnvalue">int</span>
 
882
im_draw_point (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *image</code></em>,
 
883
               <em class="parameter"><code><span class="type">int</span> x</code></em>,
 
884
               <em class="parameter"><code><span class="type">int</span> y</code></em>,
 
885
               <em class="parameter"><code><span class="type">VipsPel</span> *ink</code></em>);</pre>
 
886
<p>Draws a single point on an image. </p>
 
887
<p><em class="parameter"><code>ink</code></em>
 
888
 is an array of bytes containing a valid pixel for the image's format.
 
889
It must have at least IM_IMAGE_SIZEOF_PEL( <em class="parameter"><code>im</code></em>
 
890
 ) bytes.</p>
 
891
<p>See also: <a class="link" href="libvips-inplace.html#im-draw-line" title="im_draw_line ()"><code class="function">im_draw_line()</code></a>.</p>
 
892
<div class="refsect3">
 
893
<a name="id-1.3.9.8.13.7"></a><h4>Parameters</h4>
 
894
<div class="informaltable"><table width="100%" border="0">
 
895
<colgroup>
 
896
<col width="150px" class="parameters_name">
 
897
<col class="parameters_description">
 
898
<col width="200px" class="parameters_annotations">
 
899
</colgroup>
 
900
<tbody>
 
901
<tr>
 
902
<td class="parameter_name"><p>image</p></td>
 
903
<td class="parameter_description"><p>image to draw on</p></td>
 
904
<td class="parameter_annotations"> </td>
 
905
</tr>
 
906
<tr>
 
907
<td class="parameter_name"><p>x</p></td>
 
908
<td class="parameter_description"><p>position to draw</p></td>
 
909
<td class="parameter_annotations"> </td>
 
910
</tr>
 
911
<tr>
 
912
<td class="parameter_name"><p>y</p></td>
 
913
<td class="parameter_description"><p>position to draw</p></td>
 
914
<td class="parameter_annotations"> </td>
 
915
</tr>
 
916
<tr>
 
917
<td class="parameter_name"><p>ink</p></td>
 
918
<td class="parameter_description"><p>value to draw</p></td>
 
919
<td class="parameter_annotations"> </td>
 
920
</tr>
 
921
</tbody>
 
922
</table></div>
 
923
</div>
 
924
<div class="refsect3">
 
925
<a name="id-1.3.9.8.13.8"></a><h4>Returns</h4>
 
926
<p> 0 on success, or -1 on error.</p>
 
927
<p></p>
 
928
</div>
 
929
</div>
 
930
<hr>
 
931
<div class="refsect2">
 
932
<a name="im-read-point"></a><h3>im_read_point ()</h3>
 
933
<pre class="programlisting"><span class="returnvalue">int</span>
 
934
im_read_point (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *image</code></em>,
 
935
               <em class="parameter"><code><span class="type">int</span> x</code></em>,
 
936
               <em class="parameter"><code><span class="type">int</span> y</code></em>,
 
937
               <em class="parameter"><code><span class="type">VipsPel</span> *ink</code></em>);</pre>
 
938
<p>Reads a single point on an image. </p>
 
939
<p><em class="parameter"><code>ink</code></em>
 
940
 is an array of bytes to contain a valid pixel for the image's format.
 
941
It must have at least IM_IMAGE_SIZEOF_PEL( <em class="parameter"><code>im</code></em>
 
942
 ) bytes.</p>
 
943
<p>See also: <a class="link" href="libvips-inplace.html#im-draw-point" title="im_draw_point ()"><code class="function">im_draw_point()</code></a>.</p>
 
944
<div class="refsect3">
 
945
<a name="id-1.3.9.8.14.7"></a><h4>Parameters</h4>
 
946
<div class="informaltable"><table width="100%" border="0">
 
947
<colgroup>
 
948
<col width="150px" class="parameters_name">
 
949
<col class="parameters_description">
 
950
<col width="200px" class="parameters_annotations">
 
951
</colgroup>
 
952
<tbody>
 
953
<tr>
 
954
<td class="parameter_name"><p>image</p></td>
 
955
<td class="parameter_description"><p>image to read from</p></td>
 
956
<td class="parameter_annotations"> </td>
 
957
</tr>
 
958
<tr>
 
959
<td class="parameter_name"><p>x</p></td>
 
960
<td class="parameter_description"><p>position to read</p></td>
 
961
<td class="parameter_annotations"> </td>
 
962
</tr>
 
963
<tr>
 
964
<td class="parameter_name"><p>y</p></td>
 
965
<td class="parameter_description"><p>position to read</p></td>
 
966
<td class="parameter_annotations"> </td>
 
967
</tr>
 
968
<tr>
 
969
<td class="parameter_name"><p>ink</p></td>
 
970
<td class="parameter_description"><p>read value here</p></td>
 
971
<td class="parameter_annotations"> </td>
 
972
</tr>
 
973
</tbody>
 
974
</table></div>
 
975
</div>
 
976
<div class="refsect3">
 
977
<a name="id-1.3.9.8.14.8"></a><h4>Returns</h4>
 
978
<p> 0 on success, or -1 on error.</p>
 
979
<p></p>
 
980
</div>
 
981
</div>
 
982
<hr>
 
983
<div class="refsect2">
 
984
<a name="im-draw-smudge"></a><h3>im_draw_smudge ()</h3>
 
985
<pre class="programlisting"><span class="returnvalue">int</span>
 
986
im_draw_smudge (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *image</code></em>,
 
987
                <em class="parameter"><code><span class="type">int</span> left</code></em>,
 
988
                <em class="parameter"><code><span class="type">int</span> top</code></em>,
 
989
                <em class="parameter"><code><span class="type">int</span> width</code></em>,
 
990
                <em class="parameter"><code><span class="type">int</span> height</code></em>);</pre>
 
991
<p>Smudge a section of <em class="parameter"><code>image</code></em>
 
992
. Each pixel in the area <em class="parameter"><code>left</code></em>
 
993
, <em class="parameter"><code>top</code></em>
 
994
, <em class="parameter"><code>width</code></em>
 
995
,
 
996
<em class="parameter"><code>height</code></em>
 
997
 is replaced by the average of the surrounding 3x3 pixels. </p>
 
998
<p>This an inplace operation, so <em class="parameter"><code>image</code></em>
 
999
 is changed. It does not thread and will
816
1000
not work well as part of a pipeline. On 32-bit machines it will be limited
817
 
to 2GB images.
818
 
</p>
819
 
<p>
820
 
See also: <a class="link" href="libvips-inplace.html#im-draw-line" title="im_draw_line ()"><code class="function">im_draw_line()</code></a>.
821
 
</p>
822
 
<div class="variablelist"><table border="0" class="variablelist">
 
1001
to 2GB images.</p>
 
1002
<p>See also: <a class="link" href="libvips-inplace.html#im-draw-line" title="im_draw_line ()"><code class="function">im_draw_line()</code></a>.</p>
 
1003
<div class="refsect3">
 
1004
<a name="id-1.3.9.8.15.7"></a><h4>Parameters</h4>
 
1005
<div class="informaltable"><table width="100%" border="0">
823
1006
<colgroup>
824
 
<col align="left" valign="top">
825
 
<col>
 
1007
<col width="150px" class="parameters_name">
 
1008
<col class="parameters_description">
 
1009
<col width="200px" class="parameters_annotations">
826
1010
</colgroup>
827
1011
<tbody>
828
1012
<tr>
829
 
<td><p><span class="term"><em class="parameter"><code>image</code></em> :</span></p></td>
830
 
<td>image to smudge</td>
831
 
</tr>
832
 
<tr>
833
 
<td><p><span class="term"><em class="parameter"><code>left</code></em> :</span></p></td>
834
 
<td>area to smudge</td>
835
 
</tr>
836
 
<tr>
837
 
<td><p><span class="term"><em class="parameter"><code>top</code></em> :</span></p></td>
838
 
<td>area to smudge</td>
839
 
</tr>
840
 
<tr>
841
 
<td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
842
 
<td>area to smudge</td>
843
 
</tr>
844
 
<tr>
845
 
<td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td>
846
 
<td>area to smudge</td>
847
 
</tr>
848
 
<tr>
849
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
850
 
<td>0 on success, or -1 on error.</td>
 
1013
<td class="parameter_name"><p>image</p></td>
 
1014
<td class="parameter_description"><p>image to smudge</p></td>
 
1015
<td class="parameter_annotations"> </td>
 
1016
</tr>
 
1017
<tr>
 
1018
<td class="parameter_name"><p>left</p></td>
 
1019
<td class="parameter_description"><p>area to smudge</p></td>
 
1020
<td class="parameter_annotations"> </td>
 
1021
</tr>
 
1022
<tr>
 
1023
<td class="parameter_name"><p>top</p></td>
 
1024
<td class="parameter_description"><p>area to smudge</p></td>
 
1025
<td class="parameter_annotations"> </td>
 
1026
</tr>
 
1027
<tr>
 
1028
<td class="parameter_name"><p>width</p></td>
 
1029
<td class="parameter_description"><p>area to smudge</p></td>
 
1030
<td class="parameter_annotations"> </td>
 
1031
</tr>
 
1032
<tr>
 
1033
<td class="parameter_name"><p>height</p></td>
 
1034
<td class="parameter_description"><p>area to smudge</p></td>
 
1035
<td class="parameter_annotations"> </td>
851
1036
</tr>
852
1037
</tbody>
853
1038
</table></div>
854
1039
</div>
 
1040
<div class="refsect3">
 
1041
<a name="id-1.3.9.8.15.8"></a><h4>Returns</h4>
 
1042
<p> 0 on success, or -1 on error.</p>
 
1043
<p></p>
 
1044
</div>
 
1045
</div>
 
1046
</div>
 
1047
<div class="refsect1">
 
1048
<a name="libvips-inplace.other_details"></a><h2>Types and Values</h2>
855
1049
</div>
856
1050
</div>
857
1051
<div class="footer">
858
1052
<hr>
859
 
          Generated by GTK-Doc V1.19</div>
 
1053
          Generated by GTK-Doc V1.20</div>
860
1054
</body>
861
1055
</html>
 
 
b'\\ No newline at end of file'