fixups
This commit is contained in:
parent
50a360b738
commit
3fbd002dc0
11
TODO
11
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
|
||||
|
@ -41,6 +41,7 @@
|
||||
<xi:include href="xml/format.xml"/>
|
||||
<xi:include href="xml/freq_filt.xml"/>
|
||||
<xi:include href="xml/histograms_lut.xml"/>
|
||||
<xi:include href="xml/inplace.xml"/>
|
||||
</chapter>
|
||||
|
||||
<chapter>
|
||||
@ -48,7 +49,6 @@
|
||||
<xi:include href="xml/morphology.xml"/>
|
||||
<xi:include href="xml/resample.xml"/>
|
||||
<xi:include href="xml/mask.xml"/>
|
||||
<xi:include href="xml/inplace.xml"/>
|
||||
<xi:include href="xml/mosaicing.xml"/>
|
||||
<xi:include href="xml/other.xml"/>
|
||||
<xi:include href="xml/video.xml"/>
|
||||
|
@ -346,7 +346,7 @@ im_insert( IMAGE *main, IMAGE *sub, IMAGE *out, int x, int y )
|
||||
* Smallest common format in
|
||||
* <link linkend="VIPS-arithmetic">arithmetic</link>).
|
||||
*
|
||||
* See also: im_insert_noexpand(), im_lrjoin().
|
||||
* See also: im_insert_noexpand(), im_lrjoin(), im_draw_image().
|
||||
*
|
||||
* Returns: 0 on success, -1 on error
|
||||
*/
|
||||
|
@ -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 );
|
||||
|
@ -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.
|
||||
|
@ -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 );
|
||||
|
||||
|
@ -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.
|
||||
|
@ -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?
|
||||
|
@ -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.
|
||||
|
@ -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 );
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user