fix flood fill on some complex shapes
could fail to paint everything sometimes
This commit is contained in:
parent
8840bc8a14
commit
471ec9bcc0
|
@ -16,6 +16,7 @@
|
|||
- add vips_isdirf()
|
||||
- add PAGENUMBER support to tiff write [jclavoie-jive]
|
||||
- add all to smartcrop
|
||||
- flood fill could stop half-way for some very complex shapes
|
||||
|
||||
31/1/19 started 8.9.2
|
||||
- fix a deadlock with --vips-leak [DarthSim]
|
||||
|
|
|
@ -30,6 +30,8 @@
|
|||
* - use Draw base class
|
||||
* 21/1/14
|
||||
* - redo as a class
|
||||
* 5/4/20
|
||||
* - could fail to complete for some very complex shapes
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -197,12 +199,6 @@ buffer_add( Buffer *buf, Flood *flood, int x1, int x2, int y, int dir )
|
|||
if( x2 - x1 < 0 )
|
||||
return( buf );
|
||||
|
||||
buf->scan[buf->n].x1 = x1;
|
||||
buf->scan[buf->n].x2 = x2;
|
||||
buf->scan[buf->n].y = y;
|
||||
buf->scan[buf->n].dir = dir;
|
||||
buf->n += 1;
|
||||
|
||||
if( buf->n == PBUFSIZE ) {
|
||||
Buffer *new;
|
||||
|
||||
|
@ -211,6 +207,12 @@ buffer_add( Buffer *buf, Flood *flood, int x1, int x2, int y, int dir )
|
|||
buf = new;
|
||||
}
|
||||
|
||||
buf->scan[buf->n].x1 = x1;
|
||||
buf->scan[buf->n].x2 = x2;
|
||||
buf->scan[buf->n].y = y;
|
||||
buf->scan[buf->n].dir = dir;
|
||||
buf->n += 1;
|
||||
|
||||
return( buf );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue