Allow for negative top/left offsets in composite overlays

A top or left offset value of -1 will no longer mean that the
value is not set, but will now be an actual offset of -1.

INT_MIN for left & top will mean that the values are not set.

Co-authored-by: Christian Flintrup <chr@gigahost.dk>
This commit is contained in:
Manan Jadhav
2020-12-20 17:26:11 +00:00
committed by Lovell Fuller
parent 182beaa4a1
commit 02676140e8
8 changed files with 59 additions and 25 deletions

View File

@@ -40,6 +40,7 @@ struct Composite {
int gravity;
int left;
int top;
bool hasOffset;
bool tile;
bool premultiplied;
@@ -47,8 +48,9 @@ struct Composite {
input(nullptr),
mode(VIPS_BLEND_MODE_OVER),
gravity(0),
left(-1),
top(-1),
left(0),
top(0),
hasOffset(false),
tile(false),
premultiplied(false) {}
};