Merge branch '8.12'
This commit is contained in:
commit
728f2e2905
@ -2,6 +2,9 @@
|
|||||||
- configure fails for requested but unmet dependencies [remicollet]
|
- configure fails for requested but unmet dependencies [remicollet]
|
||||||
- add support for another quantiser [DarthSim]
|
- add support for another quantiser [DarthSim]
|
||||||
|
|
||||||
|
21/11/21 started 8.12.1
|
||||||
|
- fix insert [chregu]
|
||||||
|
|
||||||
14/6/21 started 8.12
|
14/6/21 started 8.12
|
||||||
- all tools support `--version`
|
- all tools support `--version`
|
||||||
- add vips_svgload_string() convenience function
|
- add vips_svgload_string() convenience function
|
||||||
|
@ -95,14 +95,15 @@ typedef struct _VipsInsert {
|
|||||||
*/
|
*/
|
||||||
VipsPel *ink;
|
VipsPel *ink;
|
||||||
|
|
||||||
/* Inputs cast and banded up, plus a NULL at the end.
|
/* Inputs cast and banded up, plus a NULL at the end. main is 0, sub
|
||||||
|
* is 1.
|
||||||
*/
|
*/
|
||||||
VipsImage *processed[3];
|
VipsImage *processed[3];
|
||||||
|
|
||||||
/* Geometry.
|
/* Geometry.
|
||||||
*/
|
*/
|
||||||
VipsRect rout; /* Output space */
|
VipsRect rout; /* Output space */
|
||||||
VipsRect rimage[2]; /* Position of main in output */
|
VipsRect rimage[2]; /* Position of input in output */
|
||||||
|
|
||||||
/* TRUE if we've minimised an input.
|
/* TRUE if we've minimised an input.
|
||||||
*/
|
*/
|
||||||
@ -179,24 +180,29 @@ vips_insert_gen( VipsRegion *or, void *seq, void *a, void *b, gboolean *stop )
|
|||||||
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
/* First, does this request fall entirely inside one of our inputs? If
|
/* Three cases:
|
||||||
* it does, we can just redirect the request there. Test sub first.
|
*
|
||||||
|
* 1. If r is entirely within sub, we can just paint from sub.
|
||||||
|
* 2. If r is entirely within main and does not touch sub, we can
|
||||||
|
* paint from main.
|
||||||
|
* 3. We must paint from both, and the background.
|
||||||
*/
|
*/
|
||||||
for( i = 1; i >= 0; i-- ) {
|
if( vips_rect_includesrect( &insert->rimage[1], r ) ) {
|
||||||
VipsRect *rimage = &insert->rimage[i];
|
/* Just the subimage.
|
||||||
|
*/
|
||||||
if( vips_rect_includesrect( rimage, r ) ) {
|
if( vips__insert_just_one( or, ir[1],
|
||||||
if( vips__insert_just_one( or, ir[i],
|
insert->rimage[1].left, insert->rimage[1].top ) )
|
||||||
rimage->left, rimage->top ) )
|
return( -1 );
|
||||||
return( -1 );
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
else if( vips_rect_includesrect( &insert->rimage[0], r ) &&
|
||||||
/* Otherwise, it requires both (or neither) input.
|
!vips_rect_overlapsrect( &insert->rimage[1], r ) ) {
|
||||||
*/
|
/* Just the main image.
|
||||||
if( i < 0 ) {
|
*/
|
||||||
|
if( vips__insert_just_one( or, ir[0],
|
||||||
|
insert->rimage[0].left, insert->rimage[0].top ) )
|
||||||
|
return( -1 );
|
||||||
|
}
|
||||||
|
else {
|
||||||
/* Output requires both (or neither) input. If it is not
|
/* Output requires both (or neither) input. If it is not
|
||||||
* entirely inside both the main and the sub, then there is
|
* entirely inside both the main and the sub, then there is
|
||||||
* going to be some background.
|
* going to be some background.
|
||||||
|
Loading…
Reference in New Issue
Block a user