diff --git a/TODO b/TODO
index dc3487c2..c3e09d97 100644
--- a/TODO
+++ b/TODO
@@ -1,23 +1,22 @@
-- wrap im_read_point: output DOUBLEVEC?
-
- check gtk-doc output
+- im_flood() -> im_draw_flood()? since it's inplace
+
- convsep / conv need to be able to do COMPLEX
just double the bands
-- test im_read_point()
-
- maybe im_draw_smudge() is too slow :-( also, we had a sanity failure with
it, argh
+ make a region, prepare to that, copy back over the image?
+
+- can we make more use of im__draw_pel()? eg. im_draw_rect() etc.
-- rename most of the inplace ops as im_draw_line() etc.
-
- how do we wrap inplace ops in C++ now? will checking the RW bit help at all?
- use im__inplace_base() in more places
diff --git a/doc/reference/libvips-docs.sgml.in b/doc/reference/libvips-docs.sgml.in
index 3d9d43bf..6220d6c8 100644
--- a/doc/reference/libvips-docs.sgml.in
+++ b/doc/reference/libvips-docs.sgml.in
@@ -41,6 +41,7 @@
+
@@ -48,7 +49,6 @@
-
diff --git a/libvips/conversion/im_insert.c b/libvips/conversion/im_insert.c
index b68822f6..68d91365 100644
--- a/libvips/conversion/im_insert.c
+++ b/libvips/conversion/im_insert.c
@@ -346,7 +346,7 @@ im_insert( IMAGE *main, IMAGE *sub, IMAGE *out, int x, int y )
* Smallest common format in
* arithmetic).
*
- * See also: im_insert_noexpand(), im_lrjoin().
+ * See also: im_insert_noexpand(), im_lrjoin(), im_draw_image().
*
* Returns: 0 on success, -1 on error
*/
diff --git a/libvips/include/vips/inplace.h b/libvips/include/vips/inplace.h
index d509abd8..878167c0 100644
--- a/libvips/include/vips/inplace.h
+++ b/libvips/include/vips/inplace.h
@@ -40,7 +40,7 @@ extern "C" {
int im_draw_rect( VipsImage *image,
int left, int top, int width, int height, int fill, PEL *ink );
int im_draw_circle( VipsImage *image,
- int cx, int cy, int radius, gboolean fill, PEL *ink );
+ int x, int y, int radius, gboolean fill, PEL *ink );
int im_draw_image( VipsImage *image, VipsImage *sub, int x, int y );
@@ -59,7 +59,7 @@ int im_flood_other( VipsImage *image, VipsImage *test,
int x, int y, int serial, Rect *dout );
int im_draw_mask( VipsImage *image,
- VipsImage *mask_im, int ix, int iy, PEL *ink );
+ VipsImage *mask_im, int x, int y, PEL *ink );
int im_draw_point( VipsImage *image, int x, int y, PEL *ink );
int im_read_point( VipsImage *image, int x, int y, PEL *ink );
diff --git a/libvips/inplace/flood.c b/libvips/inplace/flood.c
index c31773a1..395d8222 100644
--- a/libvips/inplace/flood.c
+++ b/libvips/inplace/flood.c
@@ -420,10 +420,6 @@ flood_new( IMAGE *image, IMAGE *test, int x, int y, PEL *ink, Rect *dout )
* The bounding box of the modified pixels is returned in @dout. @dout may be
* NULL.
*
- * This an inplace operation, so @im is changed. It does not thread and will
- * not work well as part of a pipeline. On 32-bit machines, it will be limited
- * to 2GB images.
- *
* See also: im_flood_blob(), im_flood_other(), im_flood_blob_copy().
*
* Returns: 0 on success, or -1 on error.
@@ -464,10 +460,6 @@ im_flood( IMAGE *im, int x, int y, PEL *ink, Rect *dout )
* The bounding box of the modified pixels is returned in @dout. @dout may be
* NULL.
*
- * This an inplace operation, so @im is changed. It does not thread and will
- * not work well as part of a pipeline. On 32-bit machines, it will be limited
- * to 2GB images.
- *
* See also: im_flood(), im_flood_other(), im_flood_blob_copy().
*
* Returns: 0 on success, or -1 on error.
@@ -520,10 +512,6 @@ im_flood_blob( IMAGE *im, int x, int y, PEL *ink, Rect *dout )
* The bounding box of the modified pixels is returned in @dout. @dout may be
* NULL.
*
- * This an inplace operation, so @image is changed. It does not thread and will
- * not work well as part of a pipeline. On 32-bit machines, it will be limited
- * to 2GB images.
- *
* See also: im_flood(), im_label_regions(), im_flood_blob_copy().
*
* Returns: 0 on success, or -1 on error.
diff --git a/libvips/inplace/im_draw_circle.c b/libvips/inplace/im_draw_circle.c
index d476f726..ace6d429 100644
--- a/libvips/inplace/im_draw_circle.c
+++ b/libvips/inplace/im_draw_circle.c
@@ -177,8 +177,8 @@ circle_draw( Circle *circle )
/**
* im_draw_circle:
* @image: image to draw on
- * @cx: centre of circle
- * @cy: centre of circle
+ * @x: centre of circle
+ * @y: centre of circle
* @radius: circle radius
* @fill: fill the circle
* @ink: value to draw
@@ -189,25 +189,21 @@ circle_draw( Circle *circle )
* @ink is an array of bytes containing a valid pixel for the image's format.
* It must have at least IM_IMAGE_SIZEOF_PEL( @image ) bytes.
*
- * This an inplace operation, so @image is changed. It does not thread and will
- * not work well as part of a pipeline. On 32-bit machines it will be limited
- * to 2GB images.
- *
* See also: im_draw_line().
*
* Returns: 0 on success, or -1 on error.
*/
int
im_draw_circle( VipsImage *image,
- int cx, int cy, int radius, gboolean fill, PEL *ink )
+ int x, int y, int radius, gboolean fill, PEL *ink )
{
- if( cx + radius >= 0 && cx - radius < image->Xsize &&
- cy + radius >= 0 && cy - radius < image->Ysize ) {
+ if( x + radius >= 0 && x - radius < image->Xsize &&
+ y + radius >= 0 && y - radius < image->Ysize ) {
Circle *circle;
if( im_check_coding_known( "im_draw_circle", image ) ||
!(circle = circle_new( image,
- cx, cy, radius, fill, ink )) )
+ x, y, radius, fill, ink )) )
return( -1 );
circle_draw( circle );
diff --git a/libvips/inplace/im_draw_image.c b/libvips/inplace/im_draw_image.c
index b63d0bdc..acc27035 100644
--- a/libvips/inplace/im_draw_image.c
+++ b/libvips/inplace/im_draw_image.c
@@ -109,9 +109,6 @@ im__inplace_base( const char *domain,
* number of bands in @image. @sub will be converted to @image's format, see
* im_clip2fmt().
*
- * This an inplace operation, so @image is changed. It does not thread and will
- * not work well as part of a pipeline.
- *
* See also: im_insert().
*
* Returns: 0 on success, or -1 on error.
diff --git a/libvips/inplace/im_draw_mask.c b/libvips/inplace/im_draw_mask.c
index e90ef2a6..7ab561b1 100644
--- a/libvips/inplace/im_draw_mask.c
+++ b/libvips/inplace/im_draw_mask.c
@@ -67,8 +67,8 @@ typedef struct _Mask {
/* Parameters.
*/
- int ix;
- int iy;
+ int x;
+ int y;
VipsImage *mask_im;
/* Derived.
@@ -85,7 +85,7 @@ mask_free( Mask *mask )
}
static Mask *
-mask_new( VipsImage *im, int ix, int iy, PEL *ink, VipsImage *mask_im )
+mask_new( VipsImage *im, int x, int y, PEL *ink, VipsImage *mask_im )
{
Mask *mask;
Rect area, image;
@@ -102,14 +102,14 @@ mask_new( VipsImage *im, int ix, int iy, PEL *ink, VipsImage *mask_im )
return( NULL );
}
- mask->ix = ix;
- mask->iy = iy;
+ mask->x = x;
+ mask->y = y;
mask->mask_im = mask_im;
/* Find the area we draw on the image.
*/
- area.left = ix;
- area.top = iy;
+ area.left = x;
+ area.top = y;
area.width = mask_im->Xsize;
area.height = mask_im->Ysize;
image.left = 0;
@@ -121,8 +121,8 @@ mask_new( VipsImage *im, int ix, int iy, PEL *ink, VipsImage *mask_im )
/* And the area of the mask image we use.
*/
mask->mask_clip = mask->image_clip;
- mask->mask_clip.left -= ix;
- mask->mask_clip.top -= iy;
+ mask->mask_clip.left -= x;
+ mask->mask_clip.top -= y;
return( mask );
}
@@ -285,11 +285,11 @@ mask_draw( Mask *mask )
* Returns: 0 on success, or -1 on error.
*/
int
-im_draw_mask( VipsImage *im, VipsImage *mask_im, int ix, int iy, PEL *ink )
+im_draw_mask( VipsImage *im, VipsImage *mask_im, int x, int y, PEL *ink )
{
Mask *mask;
- if( !(mask = mask_new( im, ix, iy, ink, mask_im )) )
+ if( !(mask = mask_new( im, x, y, ink, mask_im )) )
return( -1 );
/* Any points to plot?
diff --git a/libvips/inplace/im_draw_point.c b/libvips/inplace/im_draw_point.c
index f1ab9685..66b86e0c 100644
--- a/libvips/inplace/im_draw_point.c
+++ b/libvips/inplace/im_draw_point.c
@@ -76,10 +76,6 @@ typedef struct _Point {
* @ink is an array of bytes containing a valid pixel for the image's format.
* It must have at least IM_IMAGE_SIZEOF_PEL( @im ) bytes.
*
- * This an inplace operation, so @im is changed. It does not thread and will
- * not work well as part of a pipeline. On 32-bit machines it will be limited
- * to 2GB images.
- *
* See also: im_draw_line().
*
* Returns: 0 on success, or -1 on error.
diff --git a/libvips/inplace/im_draw_rect.c b/libvips/inplace/im_draw_rect.c
index d355cfc7..921118fe 100644
--- a/libvips/inplace/im_draw_rect.c
+++ b/libvips/inplace/im_draw_rect.c
@@ -73,9 +73,6 @@
* Paint pixels within @left, @top, @width, @height in @image with @ink. If
* @fill is zero, just paint a 1-pixel-wide outline.
*
- * This an inplace operation, so @main is changed. It does not thread and will
- * not work well as part of a pipeline.
- *
* See also: im_draw_circle().
*
* Returns: 0 on success, or -1 on error.
@@ -141,4 +138,3 @@ im_draw_rect( IMAGE *im,
return( 0 );
}
-