1IM_AND(3)                  Library Functions Manual                  IM_AND(3)
2
3
4

NAME

6       im_paintrect,  im_plotmask,  im_readpoint,  im_plotpoint,  im_fastline,
7       im_fastlineuser - suck pels up, and paint them down somewhere else
8

SYNOPSIS

10       #include <vips/vips.h>
11       #include <vips/rect.h>
12
13       int im_readpoint( im, x, y, ink )
14       IMAGE *im;
15       int x, y;
16       PEL *ink;
17
18       int im_plotpoint( im, x, y, ink )
19       IMAGE *im;
20       int x, y;
21       PEL *ink;
22
23       int im_plotmask( im, ix, iy, ink, mask, r )
24       IMAGE *im;
25       int ix, iy;
26       PEL *ink;
27       PEL *mask;
28       Rect *r;
29
30       int im_paintrect( im, r, ink )
31       IMAGE *im;
32       Rect *r;
33       PEL *ink;
34
35       int im_fastline( im, x1, y1, x2, y2, ink )
36       IMAGE *im;
37       int x1, y1, x2, y2;
38       PEL *ink;
39
40       int im_fastlineuser( im, x1, y1, x2, y2,
41           plot_fn, client1, client2, client3 )
42       IMAGE *im;
43       int x1, y1, x2, y2;
44       int (*plot_fn)();
45       void *client1, *client2, *client3;
46
47       int plot_fn( im, x, y, client1, client2, client3 )
48       IMAGE *im;
49       int x, y;
50       void *client1, *client2, *client3;
51

DESCRIPTION

53       im_readpoint(3) sucks a pel from position  (x,y)  into  a  buffer;  all
54       other  functions  paint  that  buffer back again in various ways. These
55       functions will work for an image  of  any  type,  since  they  rely  on
56       im_readpoint(3)  for  their  data. If you read a pel from one image and
57       paint with it to another, it is your responsibility to check  that  the
58       two images have identical pels.
59
60       All these functions are `in place,' that is, they write directly to the
61       output image! Be very careful, you can destroy data.
62
63       im_plotmask(3) takes an array of 0/255s and a Rect describing the  size
64       and  offset of the array. It adds (ix,iy) to the array offset, and then
65       paint pels into all array positions which are non-zero. Rect  need  not
66       lie inside the image - the function clips carefully at the edges.
67
68       im_paintrect(3) fills the rectangle described with ink. The Rect can be
69       any size and at any position - the function clipps against the edges of
70       the image.
71
72       im_fastline(3)  is  a replacement for im_line(3) which plots the speciā€
73       fied ink in the image. The start  and  end  points  must  lie  entirely
74       inside the image.
75
76       im_fastlineuser(3)  does  not plot points, instead it calls a user plot
77       function for every position along the line. There is no clipping -  the
78       endpoints  may  be  anywhere  at  all.  Three client values are carried
79       around and passed into the user function.
80

RETURN VALUE

82       All functions return 0 on success and -1 on error.
83

SEE ALSO

85       im_insertplace(3), im_smudge(3).
86
88       National Gallery, 1992
89

AUTHOR

91       J. Cupitt
92
93
94
95                                30 October 1992                      IM_AND(3)
Impressum