From 9e06e64e7a60ab3d4b1d939154ebffcbb7602fe6 Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Mon, 16 Nov 2009 17:26:06 +0000 Subject: [PATCH] stuff --- libvips/include/vips/inplace.h | 2 +- libvips/inplace/im_insertplace.c | 48 +++++++++++++++---------------- po/en_GB.gmo | Bin 469 -> 469 bytes po/en_GB.po | 2 +- 4 files changed, 26 insertions(+), 26 deletions(-) diff --git a/libvips/include/vips/inplace.h b/libvips/include/vips/inplace.h index 4a01a307..d292c651 100644 --- a/libvips/include/vips/inplace.h +++ b/libvips/include/vips/inplace.h @@ -42,7 +42,7 @@ int im_smear( IMAGE *im, int ix, int iy, Rect *r ); int im_smudge( IMAGE *im, int ix, int iy, Rect *r ); int im_paintrect( IMAGE *im, Rect *r, PEL *ink ); int im_circle( IMAGE *im, int cx, int cy, int radius, int intensity ); -int im_insertplace( IMAGE *big, IMAGE *small, int x, int y ); +int im_insertplace( IMAGE *main, IMAGE *sub, int x, int y ); int im_fastline( IMAGE *im, int x1, int y1, int x2, int y2, PEL *pel ); int im_fastlineuser( IMAGE *im, int x1, int y1, int x2, int y2, diff --git a/libvips/inplace/im_insertplace.c b/libvips/inplace/im_insertplace.c index 0cb337ca..40e6c057 100644 --- a/libvips/inplace/im_insertplace.c +++ b/libvips/inplace/im_insertplace.c @@ -14,7 +14,7 @@ * 24/3/09 * - added IM_CODING_RAD support * 21/10/09 - * - allow small to be outside big + * - allow sub to be outside main * - gtkdoc */ @@ -61,15 +61,15 @@ /** * im_insertplace: - * @big: main image - * @small: sub-image to insert + * @main: main image + * @sub: sub-image to insert * @x: position to insert * @y: position to insert * - * Copy @small into @big at position @x, @y. The two images must match in + * Copy @sub into @main at position @x, @y. The two images must match in * format, bands and coding. * - * This an inplace operation, so @big is changed. It does not thread and will + * 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_insert(). @@ -77,7 +77,7 @@ * Returns: 0 on success, or -1 on error. */ int -im_insertplace( IMAGE *big, IMAGE *small, int x, int y ) +im_insertplace( IMAGE *main, IMAGE *sub, int x, int y ) { Rect br, sr, clip; PEL *p, *q; @@ -85,40 +85,40 @@ im_insertplace( IMAGE *big, IMAGE *small, int x, int y ) /* Check compatibility. */ - if( im_rwcheck( big ) || - im_incheck( small ) || - im_check_known_coded( "im_insertplace", big ) || - im_check_known_coded( "im_insertplace", small ) || - im_check_same_format( "im_insertplace", big, small ) || - im_check_same_bands( "im_insertplace", big, small ) ) + if( im_rwcheck( main ) || + im_incheck( sub ) || + im_check_known_coded( "im_insertplace", main ) || + im_check_known_coded( "im_insertplace", sub ) || + im_check_same_format( "im_insertplace", main, sub ) || + im_check_same_bands( "im_insertplace", main, sub ) ) return( -1 ); - /* Make rects for big and small and clip. + /* Make rects for main and sub and clip. */ br.left = 0; br.top = 0; - br.width = big->Xsize; - br.height = big->Ysize; + br.width = main->Xsize; + br.height = main->Ysize; sr.left = x; sr.top = y; - sr.width = small->Xsize; - sr.height = small->Ysize; + sr.width = sub->Xsize; + sr.height = sub->Ysize; im_rect_intersectrect( &br, &sr, &clip ); if( im_rect_isempty( &clip ) ) return( 0 ); - /* Loop, memcpying small to big. + /* Loop, memcpying sub to main. */ - p = (PEL *) IM_IMAGE_ADDR( small, clip.left - x, clip.top - y ); - q = (PEL *) IM_IMAGE_ADDR( big, clip.left, clip.top ); + p = (PEL *) IM_IMAGE_ADDR( sub, clip.left - x, clip.top - y ); + q = (PEL *) IM_IMAGE_ADDR( main, clip.left, clip.top ); for( z = 0; z < clip.height; z++ ) { memcpy( (char *) q, (char *) p, - clip.width * IM_IMAGE_SIZEOF_PEL( small ) ); - p += IM_IMAGE_SIZEOF_LINE( small ); - q += IM_IMAGE_SIZEOF_LINE( big ); + clip.width * IM_IMAGE_SIZEOF_PEL( sub ) ); + p += IM_IMAGE_SIZEOF_LINE( sub ); + q += IM_IMAGE_SIZEOF_LINE( main ); } - im_invalidate( big ); + im_invalidate( main ); return( 0 ); } diff --git a/po/en_GB.gmo b/po/en_GB.gmo index 824534448ac1c13ec92597912e03db2603cb6359..a3b344914f39ff11804bca7942ed0fa3cfd25de7 100644 GIT binary patch delta 17 Zcmcc0e3f~^ZFVySLsKhL(}|Bh0{}Y42I&9* delta 17 Zcmcc0e3f~^ZFW-yBLgc_^NEi>0{}Xy2Ic?& diff --git a/po/en_GB.po b/po/en_GB.po index 8f5f67e7..7a32b269 100644 --- a/po/en_GB.po +++ b/po/en_GB.po @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: vips 7.16.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-11-15 20:57+0000\n" +"POT-Creation-Date: 2009-11-16 15:55+0000\n" "PO-Revision-Date: Fri Sep 5 10:27:43 BST 2008\n" "Last-Translator: john \n" "Language-Team: \n"